__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/24634785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlignment(int alignment) {
super.setAlignment(alignment);
if(this.content instanceof Paragraph) {
((Paragraph) this.content).setAlignment(alignment);
} else if(this.content instanceof Table) {
((Table) this.content).setAlignment(alignment);
} else if(this.content instanceof Image) {
((Image) this.content).setAlignment(alignment);
}
}
COM: <s> set the alignment of this rtf header footer </s>
|
funcom_train/45622658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addKeyFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ResolveKeySourceType_keyFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ResolveKeySourceType_keyFile_feature", "_UI_ResolveKeySourceType_type"),
MSBPackage.eINSTANCE.getResolveKeySourceType_KeyFile(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the key file feature </s>
|
funcom_train/4233184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleSampleRateUpdate() {
try {
double sampleRate = Double.parseDouble(sampleRateTextField.getText());
spectrumAnalyzerPanel.setSampleRate(sampleRate);
} catch (Exception e) {
sampleRateTextField.setText(Double.toString(spectrumAnalyzerPanel.getSampleRate()));
return;
}
}
COM: <s> handles events from the sample rate component </s>
|
funcom_train/22386712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParam(int nr, ExpNode val) {
ZZCell var = c.getOrNewCell(paramdim, nr+1);
if(var.s(valuedim) != null) var.disconnect(valuedim, 1);
if(val.c.s(valuedim, -1) != null) val.c.disconnect(valuedim, -1);
var.connect(valuedim, 1, val.c);
}
COM: <s> change a param in the structure </s>
|
funcom_train/12835978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAnyFailureFalse() {
_support = new DispatcherSupport(DispatcherSupport.ANY_FAILURE, 2, _mainDispatcher);
_support.success(null);
assertNull(_mainResult);
_support.success(null);
assertNotNull(_mainResult);
assertEquals(new Boolean(false), _mainResult);
}
COM: <s> tests any failure mode when both clients succeeded </s>
|
funcom_train/8347348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
exitCommand = new Command("Salir", Command.EXIT, 0);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return exitCommand;
}
COM: <s> returns an initiliazed instance of exit command component </s>
|
funcom_train/24622107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectLibrary() {
JFileChooser fileChooser = new JFileChooser(libraryPathBox.getText());
fileChooser.addChoosableFileFilter(new ExtensionFileFilter(I18N.instance.getMessage("FileStrings.OclacLibraryFile"), "ocl"));
if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
libraryPathBox.setText(file.getAbsolutePath());
}
}
COM: <s> displays a file chooser dialog to browse for the task library file </s>
|
funcom_train/23467536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHasDataFromProcessPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Perform_hasDataFromProcess_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Perform_hasDataFromProcess_feature", "_UI_Perform_type"),
TemplatePackage.Literals.PERFORM__HAS_DATA_FROM_PROCESS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the has data from process feature </s>
|
funcom_train/25484832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean givesDependency() {
Iterator itRelationships = fConnectedRelationships.iterator();
while(itRelationships.hasNext()) {
RelationshipRep relationship = ((RelationshipRep)itRelationships.next());
if (relationship.isWeak() && !relationship.getWeakEntity().equals(this)) return true;
}
return false;
}
COM: <s> returns if this entity gives dependency to some other entity relationship </s>
|
funcom_train/33601598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isStrongSetted(int acceptor) {
//******* EDUARDO BEGIN **************//
return strong[this.manager.getCurrentViewPos(acceptor)] != null;
//******* EDUARDO END **************//
}
COM: <s> informs if there is a strongly accepted value from a replica </s>
|
funcom_train/2891288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image loadImage(String location) {
MediaTracker tracker = new MediaTracker(this);
Image image = Toolkit.getDefaultToolkit().getImage(location);
tracker.addImage(image, 0);
try {
// Start downloading the image. Wait until they're loaded.
tracker.waitForAll();
} catch (InterruptedException e) {
if (Debug.mode) {
e.printStackTrace(Debug.stream);
}
return null;
}
return image;
}
COM: <s> loads an image </s>
|
funcom_train/24533784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyChanged(Notification msg){
if (ignoreMsg(msg)) return ;
if (isAddingElement(msg))
try {
createInitMethodIfNedded(msg) ;
}
catch (CodeGenException e) {
JavaVEPlugin.log(e, Level.WARNING) ;
return ;
}
super.notifyChanged(msg) ;
}
COM: <s> applied a setting has been applied to the mof object </s>
|
funcom_train/37039470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRemoteAddr() {
if (remoteAddr == null) {
if (socket != null) {
InetAddress inet = socket.getInetAddress();
remoteAddr = inet.getHostAddress();
} else {
coyoteRequest.action
(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
remoteAddr = coyoteRequest.remoteAddr().toString();
}
}
return remoteAddr;
}
COM: <s> return the remote ip address making this request </s>
|
funcom_train/18747156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BitSet computeImplies(BitSet arg1, BitSet arg2) {
BitSet result = (BitSet) arg2.clone();
for (int i = 0; i < this.stateCount; i++) {
if (!result.get(i)) {
result.set(i, arg1.get(i));
}
}
return result;
}
COM: <s> returns the implication of two bit sets </s>
|
funcom_train/35837642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML() {
Point loc = getLocation();
StringBuffer data = new StringBuffer(100);
data.append("<floater type=\""+nType+"\"");
data.append(" name=\""+oToolBar.getName()+"\"");
data.append(" isVisible=\"true\"");
data.append(" wasVisible=\"true\"");
data.append(" xPos=\""+loc.x+"\" yPos=\""+loc.y+"\"");
data.append(" row=\""+nRow+"\">");
data.append("</floater>\n");
return data.toString();
}
COM: <s> produce and xml representation of the data in this object and return </s>
|
funcom_train/11727949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkNamespaceAdded() throws RepositoryException, IOException {
try {
assertEquals("URI not correctly imported.", nsp.getURI(unusedPrefix), unusedURI);
assertEquals("Prefix not correctly imported", nsp.getPrefix(unusedURI), unusedPrefix);
} catch (NamespaceException nse) {
fail("Namespace " + unusedPrefix + ":" + unusedURI +
" not imported during document view import.");
}
}
COM: <s> checks if a namespace not yet existing in the repository is registered </s>
|
funcom_train/17398883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getCenterOfPixel(int x, int y){
if(cc==null){
cc = initCc();
}
if(cc!=null){
Vector tempX = cr.times((float)(x+0.5)*image.getResolutionX());
Vector tempY = cd.times((float)(y+0.5)*image.getResolutionY());
return cc.plus(tempX).plus(tempY);
}
else{
return null;
}
}
COM: <s> calculate the vector of the pixel center point </s>
|
funcom_train/51413857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnDataLength(String columnName) throws CMExceptionTableColumnNotExists {
try {
return getColumn(columnName).maxLenght;
} catch (CMExceptionTableColumnNotExists e) {
e.addContextInfo("Error on getting maximum datalength for the column <" + columnName+
"> of table <" + getTableName() + ">");
LOGGER.error(e);
throw e;
}
}
COM: <s> gets the length of the datatype for the given column within this table </s>
|
funcom_train/31105254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PDFFilter getPDFFilter() throws FopImageException {
/*
* Added by Eric Dalquist
* Using the bitsPerPixel var as our flag since many imges will
* have a null m_compressionType even after being loaded
*/
synchronized(this) {
if (this.m_bitsPerPixel == 0)
this.loadImage();
}
return m_compressionType;
}
COM: <s> return the original image compression type </s>
|
funcom_train/2387991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newFile(final StringBuilder password) {
getShell().setText(PasswordSafeJFace.APP_NAME + Messages.getString("PasswordSafeJFace.AppTitle.Default")); //$NON-NLS-1$
PwsFile newFile = PwsFileFactory.newFile();
newFile.setPassphrase(password);
this.setPwsFile(newFile);
this.setReadOnly(false);
}
COM: <s> create a brand new empty safe </s>
|
funcom_train/13364447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doSendMessage() {
if(m.isReadyToSend(s)){
goText.last_message=new Message(m);
goText.last_message.saveToAutoLast();
new FormSend(s, m);
} else {
Utils.popup(Lang.ALERT_WARNING_TITLE, Lang.ALERT_WARNING1, AlertType.WARNING);
}
}
COM: <s> sends the message if it is ready to send </s>
|
funcom_train/31667826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean ok(URL url) {
// if ignore is set to true, then this check returs true
if (ignore) {
return true;
}
String protocol = url.getProtocol();
String host = url.getHost();
int port = url.getPort();
if (port == -1) {
port = 80;
}
String file = url.getFile();
Vector disallows = getDisallows(protocol, host, port);
Enumeration en = disallows.elements();
while (en.hasMoreElements()) {
String pattern = (String) en.nextElement();
if (file.startsWith(pattern))
return false;
}
return true;
}
COM: <s> check whether its ok for this robot to fetch this url </s>
|
funcom_train/4358880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected class ThreadNameElement implements AccessLogElement {
public void addElement(StringBuffer buf, Date date, Request request,
Response response, long time) {
RequestInfo info = request.getCoyoteRequest().getRequestProcessor();
if(info != null) {
buf.append(info.getWorkerThreadName());
} else {
buf.append("-");
}
}
}
COM: <s> write thread name i </s>
|
funcom_train/49031596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void useConceptSlotsAsFunctions() {
conceptSlots = new Hashtable();
Enumeration en = schemas.elements();
while (en.hasMoreElements()) {
ObjectSchema schema = (ObjectSchema) en.nextElement();
String[] slotNames = schema.getNames();
for (int i = 0; i < slotNames.length; ++i) {
conceptSlots.put(slotNames[i], slotNames[i]);
}
}
}
COM: <s> instruct this ontology to support usage of concept slots as functions </s>
|
funcom_train/33281209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String jsxGet_vLink() {
String vLink = getDomNodeOrDie().getAttribute("vLink");
if (vLink == DomElement.ATTRIBUTE_NOT_DEFINED
&& getBrowserVersion().hasFeature(BrowserVersionFeatures.HTML_BODY_COLOR)) {
vLink = "#551a8b";
}
return vLink;
}
COM: <s> returns the value of the tt v link tt attribute </s>
|
funcom_train/20788960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CShape copyTo (CShape sms) {
super.copyTo(sms);
if (sms instanceof CWidget) {
CWidget smi = (CWidget) sms;
smi.widget = widget;
smi.basicListener = basicListener;
smi.init(widget, shape.getBounds2D().getMinX(), shape.getBounds2D().getMinY());
}
return this;
}
COM: <s> copies this widget into a destination widget </s>
|
funcom_train/12775127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean mayUnderstand(CGNode caller, CallSiteReference site, IMethod targetMethod, InstanceKey instance) {
if (instance instanceof ConstantKey) {
if (targetMethod.getReference().equals(ReflectiveInvocationInterpreter.METHOD_INVOKE) || isConstructorConstant(instance)
&& targetMethod.getReference().equals(ReflectiveInvocationInterpreter.CTOR_NEW_INSTANCE)) {
return true;
}
}
return false;
}
COM: <s> this object may understand a dispatch to constructor </s>
|
funcom_train/2585748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRowKeys() {
// check an empty dataset
DefaultIntervalCategoryDataset empty
= new DefaultIntervalCategoryDataset(new double[0][0],
new double[0][0]);
List keys = empty.getRowKeys();
assertEquals(0, keys.size());
}
COM: <s> some checks for the get row keys method </s>
|
funcom_train/37449939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Experiment addJournalAnnotation(ExperimentAutoFill expAutoFiller, Experiment experiment){
Annotation annotation;
try {
annotation = new Annotation(GeneratorHelper.getOwner(), GeneratorHelper.getJournal(), expAutoFiller.getJournal());
} catch (IntactException e) {
//TODO add in log "could not add"
return experiment;
}
experiment.addAnnotation(annotation);
return experiment;
}
COM: <s> create and add the journal annotation to the experiment </s>
|
funcom_train/34901263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setCurrentOptions (String[] options) {
//de-select all options first
for (int i = 0; i < optionsList.getItemCount(); i++) {
optionsList.setItemSelected(i, false);
}
//then select
for(String option : options){
if(!setCurrentOption(option))
return false;
}
return true;
}
COM: <s> set current multiple selected option with given a string array </s>
|
funcom_train/23778998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String _decorateText(String argText, Object argElement) {
if (_labelDecorators != null && argText != null && argText.length() > 0) {
for (ILabelDecorator ld : _labelDecorators) {
String decorated = ld.decorateText(argText, argElement);
if (decorated != null) {
argText = decorated;
}
}
}
return argText;
}
COM: <s> decorates text using all registered decorators </s>
|
funcom_train/9363314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getOrigins(ValueCallback<Map> callback) {
if (callback != null) {
if (WebViewCore.THREAD_NAME.equals(Thread.currentThread().getName())) {
syncValues();
callback.onReceiveValue(mOrigins);
} else {
postMessage(Message.obtain(null, GET_ORIGINS, callback));
}
}
}
COM: <s> returns a list of origins having a database </s>
|
funcom_train/3514509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUI() {
super.updateUI();
if(tree != null) {
tree.updateUI();
}
// Use the tree's default foreground and background colors in the
// table.
LookAndFeel.installColorsAndFont(this, "Tree.background",
"Tree.foreground", "Tree.font");
//System.out.println("in treetable : "+getSelectionModel().getLeadSelectionIndex());
}
COM: <s> overridden to message super and forward the method to the tree </s>
|
funcom_train/13184780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ClusteredXYBarRenderer)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
ClusteredXYBarRenderer that = (ClusteredXYBarRenderer) obj;
if (this.centerBarAtStartValue != that.centerBarAtStartValue) {
return false;
}
return true;
}
COM: <s> tests this renderer for equality with an arbitrary object returning </s>
|
funcom_train/28353980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void restoreOriginalPhases() {
double phase0;
Results rs;
java.util.List <AcceleratorNode> cavs = controller.theDoc.theSeq.getNodesOfType("rfcavity");
for(AcceleratorNode cav : cavs) {
String name = cav.getId();
if(hasNewPhase.containsKey(name)) {
CavityController tc = controller.getCavityController((SCLCavity) cav);
rs = (Results) controller.resultsMap.get(name);
phase0 = rs.phaseSP.doubleValue();
tc.setPhase(phase0);
}
}
}
COM: <s> restore original phases to the cavities </s>
|
funcom_train/20669104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleNotification(Notification notification, Object handback) {
if (logger.isDebugEnabled())
logger.debug(tmInformation.getIdtrn()+"|Evento handleNotification de Transaction Manager|");
AttributeChangeNotification at = (AttributeChangeNotification)notification;
if (at.getAttributeName().equals("TMState"))
switch((ConfiguratorMBean.TMState)at.getNewValue()) {
case STOPED:
setActivate(false);
logger.info(tmInformation.getIdtrn()+"| Detenido.|");
break;
case ACTIVE:
setActivate(true);
break;
}
}
COM: <s> method invoked when a send notification event is invoked </s>
|
funcom_train/18068497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttributes(Map attrs) throws DctmFileException {
if (this.dctmClient.isReadOnly()) {
throw new DctmFileException("Writing is not allowed");
}
Iterator keyIterator = attrs.keySet().iterator();
while (keyIterator.hasNext()) {
String key = keyIterator.next().toString();
Object value = attrs.get(key);
this.setAttribute(key, value);
}
}
COM: <s> sets multiple attributes </s>
|
funcom_train/2772400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
super.update();
if (!canModifyEditor()) {
setEnabled(false);
return;
}
ITextEditor editor= getTextEditor();
if (fOperationTarget == null && editor != null)
fOperationTarget= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(ITextOperationTarget.PREFIX) && fOperationTarget.canDoOperation(ITextOperationTarget.STRIP_PREFIX));
setEnabled(isEnabled);
}
COM: <s> implementation of the code iupdate code prototype method discovers </s>
|
funcom_train/42953999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() {
try {
if (this.socket != null) {
// Packet EobPacket = Packet.createClientPacket(Packet.PKT_CLIENT_EOB_DONE,0x0000);
// sendBytes(EobPacket.encode());
this.socket.close();
this.socket = null;
}
}
catch (IOException e) {
this.socket = null;
}
/* clear vars */
this.xportType = TRANSPORT_NONE;
}
COM: <s> disconnects from a server </s>
|
funcom_train/12646219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pack() {
Container parent = this.parent;
if (parent != null && parent.peer == null) {
parent.addNotify();
}
if (peer == null) {
addNotify();
}
// 6182409: Window.pack does not work correctly.
if (peer != null) {
setSize(getPreferredSize());
}
if (beforeFirstShow) {
isPacked = true;
}
validate();
}
COM: <s> causes subcomponents of this window to be laid out at their </s>
|
funcom_train/29617214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDouble(String name){
double value = 0;
try {
if(containsKey(name))
value = Double.parseDouble(get(name));
else
System.err.println(name+ " key does not exist.");
} catch (NullPointerException e) {
System.err.println(name + " key is not valid.");
} catch (NumberFormatException e) {
System.err.println(get(name)+ " for key \"" + name +
"\" is not a Double");
}
return value;
}
COM: <s> returns a double value of the property </s>
|
funcom_train/36063215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean changePassword( String sessionIdentifier, int userId, String newPassword, String confirmationPassword ) throws NoSessionException, GeneralizedException, InsufficientPermissionException, InputValidationException, PasswordInvalidException{
return userManager.changePassword( sessionIdentifier, userId, newPassword, confirmationPassword );
}
COM: <s> change the password for the given user </s>
|
funcom_train/35848561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetExtensionPoints() {
Collection eps = Model.getFacade().getExtensionPoints(uc1);
helper.setExtensionPoints(extend, eps);
Collection eps2 = Model.getFacade().getExtensionPoints(extend);
assertTrue(eps2.containsAll(eps));
assertTrue(eps.size() == eps2.size());
}
COM: <s> test setting extension points </s>
|
funcom_train/47675580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MsgElement addObject(MsgElement p_child) {
MsgElement parentNode = null;
if (getSelectionPath() != null) {
parentNode = (MsgElement) getSelectionPath().getLastPathComponent();
} else {
//the original tree will not have a selection on it
parentNode = getComponentInstance().getCurrentlySelectedElement(true);
}
return addObject(parentNode, p_child, true);
}
COM: <s> add an object to the jtree </s>
|
funcom_train/28296328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScopeID(String iScopeID) {
if (_Debug) {
System.out.println(" :: SeqActivity --> BEGIN - setScopeID");
System.out.println(" ::--> " + iScopeID);
}
mScopeID = iScopeID;
if (_Debug) {
System.out.println(" :: SeqActivity --> END - setScopeID");
}
}
COM: <s> associates an id with scope of this activitys objectives </s>
|
funcom_train/4644733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addContainerNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Container_ContainerName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Container_ContainerName_feature", "_UI_Container_type"),
TassooPackage.Literals.CONTAINER__CONTAINER_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the container name feature </s>
|
funcom_train/3751567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDispatch(LineFormat format, Listener l) {
// Check if the internal dispatcher has been added already
synchronized(this) {
boolean added=false;
for(Iterator i=listeners.iterator();i.hasNext();) {
Listener lst = (Listener)i.next();
if (lst==internalDispatcher) {
added=true;
break;
}
}
if (!added) listeners.add(internalDispatcher);
}
internalDispatcher.associateListener(format, l);
}
COM: <s> associates the given line format to the given listener so that when </s>
|
funcom_train/3591612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String wrapQuerystringInSQIQuery(String[] queryItems) {
String resultSQIQuery = simpleQueryBegin;
for (int i = 0; i < queryItems.length; i++) {
String queryItem = queryItems[i];
resultSQIQuery += simpleQueryTermBegin + queryItem + simpleQueryTermEnd;
}
resultSQIQuery += simpleQueryEnd;
return resultSQIQuery;
}
COM: <s> wrap the array of search terms into an sqi query </s>
|
funcom_train/43368797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDatestamp(Object nativeItem) {
RecordDTO recordDto;
try {
recordDto = recordFacade.getRecordDTO(((RecordLink) nativeItem).getId());
} catch (DoksException e) {
logger.debug(e);
throw new IllegalArgumentException(e.toString());
}
return ServerVerb.createResponseDate(recordDto.getLastModificationDate());
}
COM: <s> get the datestamp from the item </s>
|
funcom_train/10210783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void changeToGreen() {
if (logicTable.getSelectedColumn() != 0) {
((TLSCellRenderer) logicTable.getDefaultRenderer(Object.class)).getTrafficLightStates()
.get(logicTable.getSelectedRow()).set(logicTable.getSelectedColumn()-1, Color.GREEN);
}
itemChanged = true;
logicTable.repaint();
logicTable.clearSelection();
}
COM: <s> set the selected table items to green </s>
|
funcom_train/5859015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void userStateChanged(UserEvent ue) {
Integer statusInt = new Integer(this.getStatus());
PropertyChangeEvent pevent = new PropertyChangeEvent(ue.getSource().naming(),
this.naming(),
ue.getId(),
PUser.STATUS,
statusInt);
this.getEventQueue().postEvent(pevent);
}
COM: <s> called when the state of the user we listen to change </s>
|
funcom_train/17204155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateStackPush(int bytesActuallyWritten) {
if (VM.VerifyAssertions) {
VM._assert((spTopOffset - bytesActuallyWritten) >= fullStackOffset, " spTopOffset="+spTopOffset+", empty="+emptyStackOffset+", full="+fullStackOffset+", bw="+bytesActuallyWritten);
}
}
COM: <s> validate that that pushing bytes actually written </s>
|
funcom_train/35840033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL getValidURL(String systemId) {
InputStream stream = null;
URL url = null;
try {
url = new URL(systemId);
stream = url.openStream();
stream.close();
} catch (MalformedURLException e) {
url = null;
} catch (IOException e) {
url = null;
} finally {
stream = null;
}
return url;
}
COM: <s> returns a url if the system id is valid </s>
|
funcom_train/13558360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer();
result.append(this.getClass().getSimpleName());
result.append(" [");
result.append("type: " + typeToString(type) + ", ");
result.append("size: " + (imageBytes == null ? 0 : imageBytes.length));
result.append("]");
return result.toString();
}
COM: <s> gets a textual representation of this image info </s>
|
funcom_train/38957568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBcIstAbzweigPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DKW_bcIstAbzweig_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DKW_bcIstAbzweig_feature", "_UI_DKW_type"),
ModelrailwayPackage.Literals.DKW__BC_IST_ABZWEIG,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the bc ist abzweig feature </s>
|
funcom_train/18203718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeSimulation() {
SimulationEngine engine = getEngine();
// avoid future simulation cycles.
engine.pause();
engine.setSimulation( NO_SIMULATION );
if( m_simulation != NO_SIMULATION ) {
// release all simulation resources to be garbage-collectible.
m_simulation.close();
m_simulation = NO_SIMULATION;
}
}
COM: <s> closes the currently active simulation if exists </s>
|
funcom_train/5394915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
if (!(data instanceof byte[])) {
throw new IllegalArgumentException("'data' not an instance of byte[]");
}
final byte[] idata = (byte[]) data;
encodeToOutputStreamFromByteArray(idata, s);
}
COM: <s> encodes to send output stream out </s>
|
funcom_train/18244300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reverseComplement() throws SeqdataException {
// reverse the coordinates
int gappedAssemblySize = this.assembly.getGappedSize();
int temp = this.startCoordinate;
this.startCoordinate = gappedAssemblySize - this.endCoordinate - 1;
this.endCoordinate = gappedAssemblySize - temp - 1;
// invert the state of the "reversed" flag
this.reversed = !this.reversed;
}
COM: <s> reverse complement this feature i </s>
|
funcom_train/42451133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int _getIndex(Matrix in, double checkX, double checkY){
for(int row=0; row<in.getRowCount(); row++)
if(checkX == in.getAsDouble(row,0) && checkY == in.getAsDouble(row,1))
return row;
return -1;
}
COM: <s> finds the index of check x check y in matrix in </s>
|
funcom_train/9921918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel getSettingsPanel() {
JPanel jp = new JPanel();
final JCheckBox acMode = new JCheckBox("Always Call Mode", prefs.getBooleanPreference(ALWAYS_CALL_MODE));
acMode.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
prefs.setPreference(ALWAYS_CALL_MODE, acMode.isSelected());
}
});
jp.add(acMode);
return jp;
}
COM: <s> if you implement the get settings panel method your bot will display </s>
|
funcom_train/9280818 | /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
lcc.getTransactionExecute().setSavePoint(internalSavePointName, null);
// stage buffer management
}
}
COM: <s> resets the savepoint to the current spot if it is </s>
|
funcom_train/17847759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getByte() {
if (! mIsCacheFilled) {
String asString = getProperty();
if (asString == null) {
mCachedValue = mDefaultValue;
} else {
try {
mCachedValue = Byte.parseByte(asString);
}
catch (Exception exc) {
mCachedValue = mDefaultValue;
}
}
mIsCacheFilled = true;
}
return mCachedValue;
}
COM: <s> gets the current value of this property </s>
|
funcom_train/50103589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDataSetFactoryMaster(String type, DataSet dataSet) {
log("Initializing DataSet Factory Master, name="+type+", class="+Misc.getClassName(dataSet));
dataSetFactoryMasterList.put(type, dataSet);
}
COM: <s> p register a data set into the factory </s>
|
funcom_train/50314320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void intersect (int x, int y, int width, int height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
try {
lockToolkit();
long rgnHandle = Fox.FXRegion_new(x, y, width, height);
Fox.FXRegion_intersect(handle, rgnHandle);
Fox.FXRegion_delete(rgnHandle);
} finally {
unlockToolkit();
}
}
COM: <s> intersects the given rectangle to the collection of polygons </s>
|
funcom_train/38552758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSelected(int xPos, int yPos) {
if((xPos >= this.getXPos()) &&
(xPos <= (this.getXPos() + this.getWidth()) &&
(yPos >= this.getYPos()) &&
(yPos <= (getYPos() + getHeight())))) {
return true;
}
return false;
}
COM: <s> returns true if the graphic has been selected </s>
|
funcom_train/26336213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ItemContainer getItems( int x, int y ) {
if( x < 0 || x >= this.width ||
y < 0 || y >= this.height )
return null;
if( this.items[x][y] == null )
this.items[x][y] = new ItemContainer();
return this.items[x][y];
}
COM: <s> get item container by coordinate </s>
|
funcom_train/45736956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildXTree() throws OdbgenException{
//Iterate each class and build the tree for it.
for(TSClass tsClass : this._schema.getClasses()){
//Process only classes that are part of XmlSchema.
if(tsClass.getElement()!=null){
//TODO: remove this
//if(tsClass.getSimpleName().equals("Car")){
// System.out.println("");
//}
XTEClass rootElem = this.buildTreeForClass(tsClass);
this._rootElements.add(rootElem);
}
}
}
COM: <s> builds the xtree so that it can be queried later </s>
|
funcom_train/8022194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetUserName() {
System.out.println("setUserName");
String username = "";
Config instance = new Config();
instance.setUserName(username);
// 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 user name method of class vgrabber </s>
|
funcom_train/47947288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(490, 394);
this.setContentPane(getJContentPane());
this.setTitle("Jpg2Pdf");
getPositionsButtonGroup().add(getTopLeft());
getPositionsButtonGroup().add(getTopCenter());
getPositionsButtonGroup().add(getTopRight());
getPositionsButtonGroup().add(getBottomLeft());
getPositionsButtonGroup().add(getBottomCenter());
getPositionsButtonGroup().add(getBottomRight());
}
COM: <s> this method initializes this </s>
|
funcom_train/32061449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getSpecificFloatValueForGood(Good g, int subvalueindex) {
float floatvalue = 0;
float floatbasicval = design.getTechnology().getSpecificFloatValueForGood(
g, subvalueindex);
if (floatbasicval > 0) {
floatvalue = (float)(
floatbasicval *
design.getSizeModificationValue() *
design.getQuantity() *
Math.sqrt((double)design.getQualityModificationValue()));
}
return floatvalue;
}
COM: <s> returns the specified float subvalue of a specified good </s>
|
funcom_train/18256815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getMax() {
update();
double max = Double.NEGATIVE_INFINITY;
for (int i = 0; i < seriesSelected.length; i++) {
if (seriesSelected[i]) {
if (dataGroup.getSeries(i).getMax() > max) {
max = dataGroup.getSeries(i).getMax();
}
}
}
return max;
}
COM: <s> returns the maximum value across all series in the selection </s>
|
funcom_train/45230005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeItem findHostInTree(String displayName) {
TreeItem result = null;
for (int i = 0; i < root.getChildCount(); i++) {
TreeItem found = root.getChild(i);
String text = found.getText();
if (text != null & text.equals(displayName)) {
result = found;
break;
}
}
return result;
}
COM: <s> find a host in the tree using the display name as the key </s>
|
funcom_train/43817840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendPacket(byte[] data, short address){
if(address == m.getServerAddress()){
//Put in file called toSend.Server in client folder
gui.clt2tcp();
writeFile(data,"clientBuffer/toSend.CLT.SRV.TCP");
}
}
COM: <s> send packet to address </s>
|
funcom_train/2877452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(String name, LogSF logger) {
log=logger;
try {
oldHandler=Signal.handle(new Signal(name), this);
} catch (IllegalArgumentException e) {
//this happens when binding fails. In this situation, warn, but keep going
log.err("Failed to set control-C handler -is JVM running with -Xrs set?",e);
}
}
COM: <s> bind to a signal </s>
|
funcom_train/25211115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insert(String[] enc, String s) {
String[] split = s.split("/");
try {
int nr = Integer.parseInt(split[0].trim());
enc[nr] = split[1].trim();
} catch (Exception e) {
// ignore
}
}
COM: <s> insert the values dup 32 space put into the string array </s>
|
funcom_train/30218200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onMessage(String msgId) {
String msgString =
"Error trying to get failed message from store.";
try {
msgString =
sender.getMessageStore().getFromStore(msgId).
getAsString();
} catch (WSRMException e) {}
System.out.println
("Delivery of msg #" + msgId + " failed." + NL +
"Message contents are:" + NL + msgString);
}
COM: <s> called by the runtime ws reliability implementation when </s>
|
funcom_train/44901699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int fullTimeFacultyCount(){
Schedule schedule = Schedule.getSchedule();
ArrayList profs = schedule.getProfessors();
int count = 0;
for(Iterator it = profs.iterator(); it.hasNext(); ) {
if(((Professor) it.next()).getStatus() == Professor.FULL_TIME) {
count++;
}
}
return count;
}
COM: <s> counts how many full time faculty are in the schedule </s>
|
funcom_train/14081602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkArray(CtClass actual, CtClass componentType) {
if (doCheck) {
if (!actual.isArray())
throw new RuntimeException("Type missmatch: array expected!");
try {
checkType(componentType, actual.getComponentType());
} catch (NotFoundException e) {
throw new RuntimeException("Array component not found!");
}
}
}
COM: <s> checks only if the given type is array and if its component </s>
|
funcom_train/12566036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute(final String[] params, final String remainder) {
final MessageAction messageCommand = (MessageAction) SlashActionRepository.get("msg");
if ((messageCommand == null)
|| (messageCommand.getLastPlayerTell() == null)) {
return false;
}
final RPAction tell = new RPAction();
tell.put("type", "tell");
tell.put("target", messageCommand.getLastPlayerTell());
tell.put("text", remainder);
EnyarokClient.get().send(tell);
return true;
}
COM: <s> execute a chat command </s>
|
funcom_train/12564930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateGlyphEmSquare() {
float emSquareScale = 1;
if (fontFace != null) {
emSquareScale = fontFace.getEmSquareScale();
}
ElementNode c = firstChild;
while (c != null) {
if (c instanceof Glyph) {
((Glyph) c).setEmSquareScale(emSquareScale);
}
c = (ElementNode) c.nextSibling;
}
}
COM: <s> update the em square on all the tt font tt s glyphs </s>
|
funcom_train/36460099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteRecordings(Recording... rec) {
for (Recording recording : rec) {
int index = recordings.indexOf(recording);
if (index != -1) {
deleteRecordingFiles(recording);
recordings.remove(index);
events.remove(index);
fireTableRowsDeleted(index, index);
}
}
}
COM: <s> deletes one or more recordings including the files on disk </s>
|
funcom_train/43890106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean initDS(String initPath) {
try {
initPath = MIFTestUtils.fileName(initPath);
HashMap params = MIFTestUtils.getParams("mif", initPath, null);
ds = new MIFDataStore(initPath, params);
assertNotNull(ds);
return true;
} catch (Exception e) {
fail(e.getMessage());
return false;
}
}
COM: <s> utility method for instantiating a mifdata store </s>
|
funcom_train/25471317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cross(GaIndividual i) {
NgramGaIndividual i1 = this;
NgramGaIndividual i2 = (NgramGaIndividual)i;
int p = (int)(Math.random() * key.length());
int pstop = p + NN;
while (p < pstop && p < key.length()) {
char ch1 = i1.key.charAt(p);
char ch2 = i2.key.charAt(p);
i1.swap(ch1, ch2);
i2.swap(ch1, ch2);
p++;
}
i1.calcFitness();
i2.calcFitness();
}
COM: <s> one point crossover pick a random point in i1 and i2 </s>
|
funcom_train/32869590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRun(final ProseRunNode run) {
runs.remove(run);
for (Iterator all = getRunListeners().iterator(); all.hasNext();) {
final IProseRunListener each = (IProseRunListener) all.next();
Platform.run(new SafeRunnable() {
public void run() throws Exception {
each.runRemoved(run);
}
});
}
}
COM: <s> remove a prose run </s>
|
funcom_train/3170473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Heaper get(Position key) {
Heaper tmp = fetch(key);
if (tmp == null) {
throw new NotInTableException();
}
return tmp;
/*
udanax-top.st:46891:ScruTable methodsFor: 'accessing'!
{Heaper} get: key {Position}
"Return the range element at the domain position key. BLAST if the position is
not in the table."
| tmp {Heaper wimpy} |
tmp _ self fetch: key.
tmp == NULL ifTrue: [Heaper BLAST: #NotInTable.
^NULL].
^tmp!
*/
}
COM: <s> return the range element at the domain position key </s>
|
funcom_train/14597539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeAllBackLinks() {
int oldCount = backLinks.length();
int count = oldCount;
while (count-- > 0) {
backLinks.baseNodeAtIndex(count).removeForeLink(this, false);
}
backLinks = BaseNodeSequence.EMPTY;
return oldCount != 0;
}
COM: <s> removes all backlinks and the corresponding fore links </s>
|
funcom_train/9643970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean dmAttributeAlreadyExists(Attribute dmAttribute) {
AssociatedTableHeads assTableHeads = tableModel
.getAssociatedTableHeads();
for (Iterator iter = assTableHeads.iterator(); iter.hasNext();) {
AssociatedTableHead assTableHead = (AssociatedTableHead) iter
.next();
if (dmAttribute != null
&& dmAttribute.equals(assTableHead.getSelector()
.getAttribute()))
return true;
}
return false;
}
COM: <s> attribute already exists </s>
|
funcom_train/2707313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void manualLogin() throws FTPException, IOException {
checkConnection(true);
log.debug("Logging in");
ftpClient.login(masterContext.getUserName(), masterContext.getPassword());
log.debug("Logged in");
configureTransferType(masterContext.getContentType());
}
COM: <s> perform a manual login using the credentials that have been set </s>
|
funcom_train/14175526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getIcon(String name) {
Icon back = null;
Iconed i = (Iconed) getElementByName(Iconed.class, name);
if (i == null) {
// no net.frede.gui.icon referenced by the name,
// assume that name is a pathname
if (getPath() == null) {
i = new Iconed(name);
} else {
i = new Iconed(getPath(), name);
}
if (i.getIcon() != null) {
addXML(i);
}
}
back = i.getIcon();
return back;
}
COM: <s> returns the icon associated with the name in input </s>
|
funcom_train/50982702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAll_Index_NullCollection() {
final NotificationList list = new NotificationList(new ArrayList());
try {
list.addAll(0, null);
fail("Expected exception");
}
catch( final DetailedNullPointerException e ) {
assertEquals("collection", e.getArgumentName());
}
}
COM: <s> test adding a new collection at a specified index </s>
|
funcom_train/20904976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getTxtAQuery() {
if (txtAQuery == null) {
txtAQuery = new JTextArea(4,5);
txtAQuery.addKeyListener(new KeyListener(){
public void keyPressed(KeyEvent e) {}
public void keyTyped(KeyEvent e) {}
public void keyReleased(KeyEvent e) {getRdFromQuery().doClick();}
});
}
return txtAQuery;
}
COM: <s> this method initializes txt aquery </s>
|
funcom_train/40567292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTables() throws SQLException {
Connection conn = null;
Statement s = null;
try {
conn = DriverManager.getConnection(connectionURL);
s = conn.createStatement();
s.execute(createProjectEstimateTableStatement);
s.close();
} finally {
if (s != null) {
s.close();
}
if (conn != null) {
conn.close();
}
}
}
COM: <s> initialize the database by creating tables for each resource type </s>
|
funcom_train/9237203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startServer() {
if (myThread == null) {
try {
final int identPort = IdentityManager.getGlobalConfig().getOptionInt(IdentdPlugin.getDomain(), "advanced.port", 113);
serverSocket = new ServerSocket(identPort);
myThread = new Thread(this);
myThread.start();
} catch (IOException e) {
Logger.userError(ErrorLevel.MEDIUM ,"Unable to start identd server: "+e.getMessage());
}
}
}
COM: <s> start the ident server </s>
|
funcom_train/21607697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BeanDefinition getMergedBeanDefinition(String name) throws BeansException {
String beanName = transformedBeanName(name);
// Efficiently check whether bean definition exists in this factory.
if (!containsBeanDefinition(beanName) && getParentBeanFactory() instanceof ConfigurableBeanFactory) {
return ((ConfigurableBeanFactory) getParentBeanFactory()).getMergedBeanDefinition(beanName);
}
// Resolve merged bean definition locally.
return getMergedLocalBeanDefinition(beanName);
}
COM: <s> return a merged bean definition for the given bean name </s>
|
funcom_train/4106028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void firePropertyChange(final String property, final Object oldValue, final Object newValue) {
// May have read this Object from a byte-stream, need to check instance.
if(pcsDelegate == null)
pcsDelegate = new PropertyChangeSupport(this);
if (pcsDelegate.hasListeners(property)) {
pcsDelegate.firePropertyChange(property, oldValue, newValue);
}
}
COM: <s> report a property change to registered listeners for example edit parts </s>
|
funcom_train/48191310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void get_fcand(int npole, int nform, short[][] pcan, double[] freq, double[] band) {
ncan = 0;
pc = pcan;
fre = freq;
maxp = npole;
maxf = nform;
candy(ncan, 0, 0);
ncan++; // (converts ncan as an index to ncan as a candidate count)
}
COM: <s> given a set of pole frequencies and allowable formant frequencies for </s>
|
funcom_train/37797007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runningTest(String name, int testIndex, String desc) {
for (Iterator i = reporters.iterator(); i.hasNext(); ) {
IReporter r = (IReporter)i.next();
r.runningTest(name, testIndex, desc);
}
}
COM: <s> called after the test is executed </s>
|
funcom_train/5954920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTrackFieldName() {
final StringBuilder sb = new StringBuilder();
final Iterator<PathNode> it = path.iterator();
it.next(); //skip the 1st form property
while(it.hasNext()) {
sb.append(it.next().origin);
}
return sb.charAt(0) == '.' ? sb.substring(1) : sb.toString();
}
COM: <s> returns the path as a string for tracking purpose </s>
|
funcom_train/1864391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set_hexes (DSet <com.chuhay.elemwar.ElemWarObject.Hex> value) {
requestAttributeChange(_HEXES, value, this._hexes);
@SuppressWarnings("unchecked")
DSet <com.chuhay.elemwar.ElemWarObject.Hex> clone = (value == null) ? null : value.typedClone();
this._hexes = clone;
}
COM: <s> requests that the code hexes code field be set to the specified </s>
|
funcom_train/46654623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showTestsCommented() {
// Comments in test
if (alias.equalsIgnoreCase(Global.currentUser.getAlias())) {
noElementString = Global.constantsTest.noTestsCommentedByMe();
} else {
noElementString = Global.constantsTest
.noTestsCommentedByUser(alias);
}
searchOptions = new SearchOptions();
searchOptions.setTestautogenerated(0);
searchOptions.setTestexam(1);
searchOptions.setTestnormal(1);
searchOptions.setQuestionsindividual(0);
searchOptions.setAuthor(alias);
content.add(new UserCommentsTest(searchOptions, noElementString));
}
COM: <s> show tests commented </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.