__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/19905677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeBlock() throws IOException{
if(debug){
System.err.println("WriteBlock: blkIdx = " + currBlkIdx);
}
if(outStream == null){
throw new IOException("writing to an input buffer");
}
outStream.write(blockBuffer, 0, blockSize);
outStream.flush();
currRecIdx = 0;
currBlkIdx++;
}
COM: <s> write a tar buffer block to the archive </s>
|
funcom_train/33282165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object jsxGet_scripts() {
if (scripts_ == null) {
scripts_ = new HTMLCollection(getDomNodeOrDie(), false, "HTMLDocument.scripts") {
@Override
protected boolean isMatching(final DomNode node) {
return node instanceof HtmlScript;
}
};
}
return scripts_;
}
COM: <s> returns the value of the java script attribute tt scripts tt </s>
|
funcom_train/51199766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadItemsFromDb(String sourceURI, long principalId) throws ManagerException {
try {
setLocalItems(this.db.getLocalItems(sourceURI, principalId));
} catch (Exception ex) {
throw new ManagerException("Error loading items From db" + ex.getMessage());
}
}
COM: <s> loads items from database </s>
|
funcom_train/19458472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void widgetSelected(SelectionEvent event) {
ToolItem toolItem = (ToolItem) event.getSource(); // change order tool item
Rectangle rect = toolItem.getBounds();
Point pt = new Point(rect.x, rect.y + rect.height);
pt = getToolBar().toDisplay(pt);
getChangeImageOrderMenu().setLocation(pt.x, pt.y);
getChangeImageOrderMenu().setVisible(true);
}
COM: <s> whenever the button is clicked force the menu to be shown </s>
|
funcom_train/3883165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCataloguePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_catalogue_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_catalogue_feature", "_UI_DocumentRoot_type"),
ImsMdRootv1p1Package.Literals.DOCUMENT_ROOT__CATALOGUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the catalogue feature </s>
|
funcom_train/12115517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC13(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.partiModificaJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c13 parti modifica jbutton </s>
|
funcom_train/4972049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ComplexArray divide(ComplexScalar rhs) {
ComplexArray result = new ComplexArray(this.getLength());
for (int i = 0; i < this.re.length; i++) {
result.setElement(this.getElement(i).divide(rhs), i);
}
return result;
}
COM: <s> divide this complex array by a complex scalar </s>
|
funcom_train/5395890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFatalError() {
System.out.println("fatalError");
SAXParseException e = null;
DocumentWriter instance = new DocumentWriter();
instance.fatalError(e);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of fatal error method of class org </s>
|
funcom_train/50873485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(FtpFile ftpFile) {
//if this is a directory and the other is not, then return -1
if (this.isDirectory() && !ftpFile.isDirectory()) {
return -1;
} else if (!this.isDirectory() && ftpFile.isDirectory()) {
return 1;
} else {
return name.compareToIgnoreCase(ftpFile.getName());
}
}
COM: <s> compare two ftp files to see which is greater </s>
|
funcom_train/25291264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlignmentAxis(Vector3f axis) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_AXIS_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("OrientedShape3D2"));
if (isLive())
((OrientedShape3DRetained)retained).setAlignmentAxis(axis);
else
((OrientedShape3DRetained)retained).initAlignmentAxis(axis);
}
COM: <s> sets the new alignment axis </s>
|
funcom_train/11713612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getVisualDecorationType (int status) {
if (status == AnnotationObject.DIFF_STATUS_MATCH) {
return VISUAL_DECO_TYPE_MATCHED;
} else if (status == AnnotationObject.DIFF_STATUS_ADDED) {
return VISUAL_DECO_TYPE_ADDED;
} else if (status == AnnotationObject.DIFF_STATUS_DELETED) {
return VISUAL_DECO_TYPE_DELETED;
}
return null;
}
COM: <s> get the visual decoration type e </s>
|
funcom_train/3703641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSometimesEndTime() {
AccessConfig config = access.getAccessConfig();
String str = config.getEndBetweenTimeAsString();
if (str != null && getTimesIndex(str) >= 0) {
return (str);
}
else {
return (DEFAULT_END_TIME);
}
} // of method
COM: <s> get the end time or the default if not set </s>
|
funcom_train/38628989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConfig (tDigitalConfig config) {
try {
io.setDigitalConfig(inputNo, config);
} catch (DriverStationEnhancedIO.EnhancedIOException e) {
// EnhancedIOException represents a hardware failure and should
// really be unchecked
// TODO: Make a more specific exception for this
throw new RuntimeException(e.getMessage());
} // catch
} // setConfig()
COM: <s> sets the configuration of the input </s>
|
funcom_train/50242737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doYearLeadingSeparationText(int unused) throws JspException{
JspWriter writer = pageContext.getOut();
try {
writer.print( " " );
} catch (IOException e) {
throw new JspException(
messages.getMessage("yearselector.io", e.toString()) );
}
return;
} // doYearLeadingSeparationText(int)
COM: <s> writes the text that separates year links </s>
|
funcom_train/50156492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doInit(String xpath, Element parent, String dataTypeName, RendererState state) {
init(xpath, parent, state);
// here is where we explicitly set the type for this Renderer
typeName = dataTypeName;
typeDef = sh.getGlobalDef(typeName);
// prtln(report() + "\t(type explicitly set)\n");
}
COM: <s> constructor for the renderer object in which the data type to render </s>
|
funcom_train/10657244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveAttributesEnumSmall() {
AttributeSet as = StyleContextTest.addAttribute(10);
assertTrue(as instanceof SimpleAttributeSet);
// Remove one element
AttributeSet test = sc.removeAttributes(as, new AttributeNameEnumeration(1));
assertEquals(9, test.getAttributeCount());
if (BasicSwingTestCase.isHarmony()) {
assertTrue(test instanceof SmallAttributeSet);
}
}
COM: <s> removes one attribute from a set </s>
|
funcom_train/9550840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("AccessContentAsFileService".equals(portName)) {
setAccessContentAsFileServiceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/28672820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBeanPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RefType_bean_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RefType_bean_feature", "_UI_RefType_type"),
BeansPackage.Literals.REF_TYPE__BEAN,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the bean feature </s>
|
funcom_train/31225389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rename(String on, String nn) {
if (server.connectedUsers.containsKey(nn)) {
writeObject(new SD_Error("username already exists"));
//writeObject(new SD_Rename(nn, name));
} else {
server.connectedUsers.remove(name);
server.connectedUsers.put(nn, this);
server.broadcast(new SD_Rename(name, nn), nn, channel);
server.updateUserExport();
name = nn;
}
}
COM: <s> used to rename the client </s>
|
funcom_train/15616902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void commitTopicVersion() throws SAXException {
// FIXME - support rollback
this.currentTopic.setTopicContent(currentTopicVersion.getVersionContent());
// only the final import version is logged
this.currentTopicVersion.setLoggable(false);
// no recent change record needed - can be added by reloading all recent changes if desired
this.currentTopicVersion.setRecentChangeAllowed(false);
this.topicVersionBuffer.add(this.currentTopicVersion);
this.writeTopicVersion(false);
}
COM: <s> write a topic version record to the database </s>
|
funcom_train/12186864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushCompilableAttribute(Boolean compilable) {
XMLPipelineContext pipelineContext = getPipelineContext();
Object o = pipelineContext.getProperty("TransformOperation");
if (o != null) {
// There is a transform element surrounding this one.
outerCompilable = (Boolean) o;
} else {
// There is no transform element outside of this one
outerCompilable = null;
}
pipelineContext.setProperty("TransformOperation", compilable, false);
}
COM: <s> call this method when we start a new transform element to ensure that </s>
|
funcom_train/50216956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TemplateModel get(String name) throws TemplateModelException {
TemplateModel result = globalVariables.get(name);
if (result == null) {
result = rootDataModel.get(name);
}
if (result == null) {
result = getConfiguration().getSharedVariable(name);
}
return result;
}
COM: <s> this method returns a variable from the global namespace and falls back </s>
|
funcom_train/7798488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replace(ASTNode node, ASTNode replacement, TextEditGroup editGroup) {
if (node == null) {
throw new IllegalArgumentException();
}
RewriteEvent event= getEvent().replaceEntry(node, replacement);
if (editGroup != null) {
getRewriteStore().setEventEditGroup(event, editGroup);
}
}
COM: <s> replaces the given node from its parents list property in the rewriter </s>
|
funcom_train/44659193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showPopupMenu(MouseEvent e) {
if (onAboutToShow(e)) {
JPopupMenu popupToShow = getPopupMenu(e);
if (popupToShow == null) {
return;
}
popupToShow.show(e.getComponent(), e.getX(), e.getY());
popupToShow.setVisible(true);
}
}
COM: <s> called to display the popup menu </s>
|
funcom_train/2268067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteInode(InodeHandle inode) throws IndexException {
Term term = makeTermFromInode(inode);
try {
_iWriter.deleteDocuments(term);
} catch (CorruptIndexException e) {
throw new IndexException("Unable to delete " + inode.getPath() + " to the index", e);
} catch (IOException e) {
throw new IndexException("Unable to delete " + inode.getPath() + " to the index", e);
}
}
COM: <s> queues an inode for deletion from index </s>
|
funcom_train/5662691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProjectsEnabledPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_View_projectsEnabled_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_View_projectsEnabled_feature", "_UI_View_type"),
ViewPackage.eINSTANCE.getView_ProjectsEnabled(),
true,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the projects enabled feature </s>
|
funcom_train/25567735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateConstraints() {
int edge, n = getComponentCount()-1;
if(n==0)return;
Component comp;
GridBagConstraints con;
boolean wasVertical = getConstraints(getComponent(n)).gridy > 0;
for(int i=0; i<=n; i++){
comp = getComponent(i);
con = getConstraints(comp);
if(i==0) edge = -1;
else if(i==n) edge = 1;
else edge = 0;
add(comp, con, wasVertical ? con.gridy : con.gridx, edge);
}
}
COM: <s> updates constaraints of all added buttons according to current properties </s>
|
funcom_train/35669300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MembershipFunction fclTreeFuzzifyTermGenBell(AST tree) {
AST child = tree.getFirstChild();
double a = parseDouble(child);
double b = parseDouble(child.getNextSibling());
double mean = parseDouble(child.getNextSibling().getNextSibling());
MembershipFunction membershipFunction = new MembershipFunctionGenBell(a, b, mean);
return membershipFunction;
}
COM: <s> parse a tree for generilized bell memebership function </s>
|
funcom_train/31171571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getparams(){
StringBuffer params = new StringBuffer();
boolean firstparam = true;
Enumeration e = postorder.elements();
while(e.hasMoreElements()){
String name = (String)e.nextElement();
String value = getPostfieldValue(name);
if(firstparam){
firstparam=false;
}else{
params.append("&");
}
params.append(URLEncoder.encode(name)+
"="+ URLEncoder.encode(value));
}
return params.toString();
}
COM: <s> returns a string representation of the post fields for this task </s>
|
funcom_train/39907955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTopX() {
int topX = cords.get(0).getX();
for(int i = 1; i < cords.size(); i++) {
int temp =cords.get(i).getX();
if(temp < topX)
topX = temp;
}
topX /= Position.getLength();
return topX;
}
COM: <s> method returning the top left corner of the brick </s>
|
funcom_train/9484832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTemplate(String resourceUri) {
InputStream in =
this.getClass().getResourceAsStream(resourceUri);
try {
int currentChar;
StringBuffer content = new StringBuffer();
while ((currentChar = in.read()) != -1) {
content.append(Character.toChars(currentChar));
}
this.resourceString = content.toString();
} catch (Exception exc) {
provider.error(
logger, "bootstrap.resourceerror", resourceUri);
printer.print(exc);
}finally{
IOUtils.close(in);
}
}
COM: <s> sets the current resource string by reading in the uri of the </s>
|
funcom_train/22209014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTopicCount() {
try {
TopicMap topicMap = this.getTopicMap();
XObject result = XPathAPI.eval((Node) topicMap,
"*[name() = 'topic']");
NodeList topics = result.nodelist();
int xPathSize = topics.getLength();
int size = topicMap.getTopics().size();
assertEquals(size, xPathSize);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> compares the count of topics retrieved by calling code get topics code </s>
|
funcom_train/12782927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInit8() throws Exception {
ClassLoader parent = getClass().getClassLoader();
IRunConfigData config = new RunConfigData();
config.setTargetClasspath(IRunConfigData.DEFAULT_CLASSPATH);
testObj = new InstrumentingClassLoader(parent, config);
assertEquals(createURLs(IRunConfigData.DEFAULT_CLASSPATH), testObj.getClasspath().getClasspath());
assertEquals(createURLs(IRunConfigData.DEFAULT_CLASSPATH), testObj.getTargetClasspath());
}
COM: <s> target classpath set to default classpath </s>
|
funcom_train/18462670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMatrix(String a_name, int a_col, int a_row, char a_value) {
char[][] m_matrix = m_matrices.get(a_name);
if (m_matrix == null) {
throw new IllegalArgumentException("Matrix with name " + a_name +
" not found!");
}
m_matrix[a_col][a_row] = a_value;
}
COM: <s> sets a matrix field with a value </s>
|
funcom_train/26538728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showWarningDialog(String directory) {
Resources r = Resources.getDashBundle("pspdash.PSPDashboard");
JOptionPane.showMessageDialog
(null,
r.formatStrings("Data_Sharing_Violation_Message_FMT", directory),
r.getString("Data_Sharing_Violation_Title"),
JOptionPane.ERROR_MESSAGE);
}
COM: <s> display a dialog to the user indicating that someone on </s>
|
funcom_train/21701955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveExam(Exam newExam) {
DBFactory.getInstance().saveObject(newExam);
Tracing.logInfo("New exam with id " + newExam.getKey() + " was created.", ExamDBManager.class);
//newExam = (Exam)DBFactory.getInstance().loadObject(newExam);
OLATResourceManager rm = OLATResourceManager.getInstance();
OLATResource ores = rm.createOLATResourceInstance(newExam);
rm.saveOLATResource(ores);
}
COM: <s> persists the given exam in the database </s>
|
funcom_train/3915235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCopyFile_NotExists() throws Exception {
File fileSrc = new File("absolutely_bogus.txt");
File fileTgt = FileSupport.getTempFile(".txt");
try {
FileUtils.copyFile(fileSrc, fileTgt);
// Shouldn't reach here
fail("Should have thrown an Exception");
} catch(Exception ex) {
assertTrue(true);
}
}
COM: <s> copy file rejects non existing folders </s>
|
funcom_train/46293822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InfoHeader write(String string) throws IOException {
writeLock.lock();
try {
SnapshotLogFile snapshotLogFile = getCurrent();
InfoHeader infoHeader = snapshotLogFile.write(string);
deleteOldLogFile();
if (snapshotLogFile.getSize() >= maxSize) {
createNewLogFile();
}
return infoHeader;
} finally {
writeLock.unlock();
}
}
COM: <s> write the string to the log file </s>
|
funcom_train/29767929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTimestamp(VFile toCompare, long ignoreDiffInMillis) {
long ts1 = this.lastModified();
long ts2 = toCompare.lastModified();
long diff = ts2 - ts1;
if (ts2 < ts1) {
if (-diff - ignoreDiffInMillis > 0) {
return -1;
}
} else if (ts2 > ts1) {
if (diff - ignoreDiffInMillis > 0) {
return 1;
}
}
return 0;
}
COM: <s> compares the timestamp of two files </s>
|
funcom_train/37581856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map getTypePropertyDescriptors() {
Map map = new HashMap();
try {
PropertyDescriptor[] descriptors = CacheManager.getPropertyDescriptors(getClass());
for (int i = 0; i < descriptors.length; i++) {
PropertyDescriptor descriptor = descriptors[i];
String name = descriptor.getName();
if ("offLineAvailable".equals(name)) //$NON-NLS-1$
continue;
map.put(name, descriptor);
}
} catch (Throwable t) {
ErrorHandler.handle(t);
}
return map;
}
COM: <s> determines the property descriptors when the class is initialized for the </s>
|
funcom_train/11322658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFormSubmission() {
if (formSubmission == null) {
Context context = getContext();
String requestMethod = context.getRequest().getMethod();
if (!getMethod().equalsIgnoreCase(requestMethod)) {
return false;
}
formSubmission = getName().equals(context.getRequestParameter(FORM_NAME));
}
return formSubmission;
}
COM: <s> return true if the page request is a submission from this form </s>
|
funcom_train/38290329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkStartElement(final boolean mustBeStart) {
final int eventType = getEventType();
final boolean checkError;
if (mustBeStart)
checkError = (eventType != XMLStreamConstants.START_ELEMENT);
else
checkError = (eventType != XMLStreamConstants.START_ELEMENT)
&& (eventType != XMLStreamConstants.END_ELEMENT);
if (checkError)
throw new IllegalStateException(
"current event is not an element event."); //$NON-NLS-1$
}
COM: <s> ensures that current node is an element node </s>
|
funcom_train/50094875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Before public void setUp() throws Exception {
String filename = "data/gamess/Cl2O.log";
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
this.inputReader = new BufferedReader(new InputStreamReader(ins));
this.gamessReaderUnderTest = new GamessReader(this.inputReader);
setSimpleChemObjectReader(this.gamessReaderUnderTest, filename);
}
COM: <s> sets up the fixture </s>
|
funcom_train/1942307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeUserConf() {
File confdir = new File(System.getProperty("user.home") + System.getProperty("file.separator") + ".symsalabim");
if (!confdir.exists()) confdir.mkdir();
try {
File conf = new File(confdir, "login.xml");
XMLEncoder encoder = new XMLEncoder(new FileOutputStream(conf));
encoder.writeObject(this.username);
encoder.writeObject(this.serverlist);
encoder.writeObject(this.servername);
encoder.close();
} catch (Exception e) {
e.printStackTrace(); //Debug
}
}
COM: <s> write users configuration name serverlist to a </s>
|
funcom_train/3003468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int index, int value) {
if (index > size) {
throw new IndexOutOfBoundsException("Index " + index +
", not in range [0-" + size + "]");
}
ensureCapacity(size + 1);
System.arraycopy(data, index, data, index + 1, size - index);
data[index] = value;
size++;
}
COM: <s> inserts the specified code int code at the specified position in </s>
|
funcom_train/45248175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setLowerSelectedElement(Object element) {
if (fQualifierElements == null) {
return;
}
// find matching index
int i;
for (i = 0; i != fQualifierElements.length; i++) {
if (fQualifierElements[i].equals(element)) {
break;
}
}
// set selection
if (i != fQualifierElements.length) {
fLowerList.setSelection(i);
}
}
COM: <s> selects an element in the lower pane </s>
|
funcom_train/46826279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JogreTableFrame getTableFrame (int tableNum) {
Table table = conn.getTableList().getTable (tableNum);
// If player no longer is within table, don't open table
if (table != null && !table.containsPlayer(this.conn.getUsername()))
return null;
// If table exists, retrieve frame and send the message to it
if (table != null)
return getTableFrame(table);
return null;
}
COM: <s> overloaded version when you are sure that the table exists other wise </s>
|
funcom_train/50911485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Real2 getUnitVector() {
double length = this.getLength();
if (Real.isZero(length, Real.getEpsilon())) {
throw new EuclidRuntimeException("zero length vector");
}
Real2 temp = new Real2(this.x, this.y);
temp = temp.multiplyBy(1.0 / length);
return temp;
}
COM: <s> get unit vector </s>
|
funcom_train/2759285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recycleInvalidConnections() {
Iterator connectionHandlerIterator = _connectionHandlers.iterator();
while(connectionHandlerIterator.hasNext()) {
ConnectionHandler connectionHandler = (ConnectionHandler) connectionHandlerIterator.next();
Connection connection = connectionHandler.getConnection();
if(connection == null || false == connectionHandler.checkConnection(connection)) {
connectionHandler.recycleConnection(connection);
}
}
}
COM: <s> checks all the connections </s>
|
funcom_train/2468075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int binarySearch(int key) {
int low = 0;
int high = size - 1;
while (low <= high) {
int mid = (low + high) >> 1;
int midVal = values[mid];
if (midVal < key) {
low = mid + 1;
} else if (midVal > key) {
high = mid - 1;
} else {
return mid; // key found
}
}
return -(low + 1); // key not found.
}
COM: <s> performs a binary search of the entity array for the specified key </s>
|
funcom_train/34579213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuildRecordFromBioSenseCV(){
String line = "DOD,01/20/2009,01821,MA,19,\"Outpatient, Final Diagnosis\",1,Syndrome,92,Chronic Disease,999";
GIPSERecord record = GIPSERecordBuilder.buildGIPSERecordFromBioSenseExtract(line);
assertEquals(record.getState(),"MA");
assertEquals(record.getZip5(),"01821");
}
COM: <s> tests the line parsing routines for bio sense extract lines </s>
|
funcom_train/30251321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean update( Agenda agenda ) throws HibernateException {
boolean result = false;
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
Agenda a = (Agenda) session.load(Agenda.class, agenda.getId());
a.setCreator(agenda.getCreator());
session.flush();
tx.commit();
result = true;
}
catch (HibernateException he) {
if (tx!=null) {
tx.rollback();
}
throw he;
}
finally {
session.close();
}
return result;
}
COM: <s> updates the agenda record in the database </s>
|
funcom_train/21848081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getXPosOfGlyph(int line) {
int xPos = numberWidth;
if (drawOverLineNumbers) {
xPos = getWidth() - glyphWidth;
if (cachedCountOfAnnos == -1 || cachedCountOfAnnosForLine != line) {
cachedCountOfAnnos = annos.getNumberOfAnnotations(line);
cachedCountOfAnnosForLine = line;
}
if (cachedCountOfAnnos > 1)
xPos -= glyphButtonWidth;
}
return xPos;
}
COM: <s> count the x position of the glyph on the line </s>
|
funcom_train/35715479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void informListeners() {
if (fRevisionInfo == null || fRevisionListeners.isEmpty())
return;
RevisionEvent event= new RevisionEvent(fRevisionInfo);
Object[] listeners= fRevisionListeners.getListeners();
for (int i= 0; i < listeners.length; i++) {
IRevisionListener listener= (IRevisionListener) listeners[i];
listener.revisionInformationChanged(event);
}
}
COM: <s> informs the revision listeners about a change </s>
|
funcom_train/7315641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
if (repository == null) {
log.info("Shutdown: Repository already stopped.");
} else {
log.info("RepositoryStartupServlet shutting down...");
shutdownRepository();
unregisterRMI();
unregisterJNDI();
log.info("RepositoryStartupServlet shut down.");
}
}
COM: <s> does a shutdown of the repository and deregisters it from the rmi </s>
|
funcom_train/5551267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDegenerateInverseCumulativeProbability() throws Exception {
PoissonDistribution dist = DistributionFactory.newInstance().createPoissonDistribution(DEFAULT_TEST_POISSON_PARAMETER);
assertEquals(Integer.MAX_VALUE, dist.inverseCumulativeProbability(1.0d));
assertEquals(-1, dist.inverseCumulativeProbability(0d));
}
COM: <s> test the degenerate cases of a 0 </s>
|
funcom_train/47280574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void compoundGroupEnd() {
if (undoCount <= 0) {
throw new IllegalStateException("No compound edit in progress");
}
undoCount--;
if (undoCount == 0)
returnToEditState();
if (logger.isDebugEnabled()) {
logger.debug("compoundGroupEnd: edit stack =" + undoCount + " ce=" + ce);
}
}
COM: <s> ends a compound edit </s>
|
funcom_train/37066886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// add all hash vals? == print
if (wantFullString) {
ByteArrayOutputStream os= new ByteArrayOutputStream();
PrintStream out= new PrintStream(os);
printObj( out,0);
out.flush();
return os.toString();
}
return getTag()+":"+getId();
}
COM: <s> to string common java object method </s>
|
funcom_train/22077790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test09RDNNameError() {
Map input = new HashMap();
input.put("nom", "NAQUIN");
input.put("pid", "toto");
Map lenv = new HashMap();
input.put("id", "tutu");
npmock.reset();
npmock.expects(once()).method("parse").with(eq("cn=tutu")).will(
throwException(new NamingException("Invalid name")));
npmock.expects(once()).method("parse").with(eq("cn=toto")).will(
returnValue(cn));
try {
sm.getInputChain().addMapper(new StringVariable("newRDN",new VariableString("cn=${id}")));
sm.map(input, lenv);
fail("Should have thrown exception");
} catch (MapperException e) {
}
}
COM: <s> error catching with rdn name </s>
|
funcom_train/3550521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFieldSize(String newFieldSize) {
if (newFieldSize.equals("small") || newFieldSize.equals("medium") || newFieldSize.equals("large")) {
fieldSize = newFieldSize;
}
else {
throw new IllegalArgumentException("illegal field size");
}
}
COM: <s> sets the string describing field size of the dto </s>
|
funcom_train/21314563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String updateContainerId () {
// return (String) this.d2wContext().valueForKey("updateContainerId");
if (this.updateContainerId == null) {
this.updateContainerId = this.d2wContext().entity().name() + "_" + Math.abs(((EVApplication) this.application()).randomInteger());
}
return this.updateContainerId;
}
COM: <s> the update container id from the direct to web context </s>
|
funcom_train/40449361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(ObjectTypePair obj) {
if (obj == null) {
return false;
}
for (ObjectTypePair stackObject : stack) {
if (stackObject.getObject() == obj.getObject()
&& stackObject.type.equals(obj.type) ) {
return true;
}
}
return false;
}
COM: <s> performs a memory reference check to see it the </s>
|
funcom_train/1653422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBiToHex_BigInteger() {
BigInteger methodBigInteger = new BigInteger("999999999999999");
String expectedHexValue = "038d7ea4c67fff";
assertEquals(HexUtil.biToHex(methodBigInteger),expectedHexValue);
methodBigInteger = new BigInteger("0");
expectedHexValue = "00";
assertEquals(HexUtil.biToHex(methodBigInteger),expectedHexValue);
methodBigInteger = new BigInteger("72057594037927935");
expectedHexValue = "00ffffffffffffff";
assertEquals(HexUtil.biToHex(methodBigInteger),expectedHexValue);
}
COM: <s> test bi to hex big integer method </s>
|
funcom_train/24641295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharSequence getText(Document doc) {
Segment text = new Segment();
try {
doc.getText(start, length, text);
} catch (BadLocationException ex) {
Logger.getLogger(Token.class.getName()).log(Level.SEVERE, null, ex);
}
return text;
}
COM: <s> get the text of the token from this document </s>
|
funcom_train/29685478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String extractExposureTime() {
Rational exposure = getExifRational(ExifDirectory.TAG_EXPOSURE_TIME);
if (exposure != null) {
if (exposure.getNumerator() > exposure.getDenominator()) {
// longer than 1 second, so perform division
double speed = exposure.doubleValue();
return roundDecimal(speed, 1);
}
// less than 1 second, so leave as fraction
return exposure.toSimpleString(false);
}
return null;
}
COM: <s> extract the exposure time as a string value </s>
|
funcom_train/31357635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLObject get(List keys, int serviceID, boolean all) {
// Variables
ArrayList keyList;
// Check for PRIVATE
keyList = new ArrayList();
if (type.equals("PRIVATE") == true) {
keyList.add(String.valueOf(serviceID));
} // if
// Add Keys to List
keyList.addAll(keys);
// Call Helper method to do actual work
return get(map, keyList, all);
} // get()
COM: <s> get property value using the specified keys </s>
|
funcom_train/20344102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T cast(Object o) throws ClassCastException {
if (o == null) {
return null;
}
if (javaType.isInstance(o)) {
return javaType.cast(o);
}
throw new ClassCastException("Object " + o + " cannot be casted to " + javaType.getName());
}
COM: <s> casts the object to the underlying java type </s>
|
funcom_train/4499567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean gameLost() {
for (int i = 0; i < ChessBoard.SIZE; i++) {
for (int j = 0; j < ChessBoard.SIZE; j++) {
if (k1.canEatAt(i, j) && !c.hasBeenVisited(i, j)) {
return false;
}
}
}
return true;
}
COM: <s> checks if the knight is stuck and cannot move to any point </s>
|
funcom_train/50877743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Projection getProjection(){
if (myProjection != null){
myProjection.setEllipsoid((Ellipsoid) myComboElipses.getSelectedItem());
myProjection.setEasting(getFalseEasting());
myProjection.setNorthing(getFalseNorthing());
myProjection.setLatOragin(getOrrigionalLatitude());
myProjection.setLonOragin(getOrrigionalLongitude());
}
return myProjection;
}
COM: <s> return the edited projection back to the caller </s>
|
funcom_train/7271540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRoot(File root) {
if (roots.remove(root)) {
// remove old root and add dir and expand to root
// cancel editing, since we're removing from the tree
directoryTree.cancelEditing();
directoryTreeModel.removeSubRoot(root);
removeFromPath(root);
}
}
COM: <s> removes code root code from the tree of shared roots </s>
|
funcom_train/14637139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPort() {
char[] port_terminators = {';', '?'};
Parser par = new Parser(m_URL, 4); // skip "sip:"
int begin = par.indexOf(':');
if (begin < 0) {
return -1;
} else {
begin++;
par.setPos(begin);
int end = par.indexOf(port_terminators);
if (end < 0) {
return Integer.parseInt(m_URL.substring(begin));
} else {
return Integer.parseInt(m_URL.substring(begin, end));
}
}
}
COM: <s> gets port of sip url returns 1 if port is not specidfied </s>
|
funcom_train/1605869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addImportURIPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Import_importURI_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Import_importURI_feature", "_UI_Import_type"),
EntitiesPackage.Literals.IMPORT__IMPORT_URI,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the import uri feature </s>
|
funcom_train/51526868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttachmentType findByAttachmentTypeKey(String attachmentTypeKey) {
String hql = "from AttachmentType att where att.key = ?";
List<AttachmentType> atList = baseDao.find(hql, attachmentTypeKey, AttachmentType.class);
if(!atList.isEmpty()) {
return atList.get(0);
}
else {
return null;
}
}
COM: <s> finds the existing attachment type needed for db update </s>
|
funcom_train/41179103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserDetails(String name, String password, AdministrativClearanceLvls admin_clearance, BioClearanceLvls bio_clearance, int id) {
// Bouml preserved body begin 0002297B
this.name = name;
this.password = password;
this.administrative_clearance = admin_clearance;
this.biological_clearance = bio_clearance;
this.id = id;
// Bouml preserved body end 0002297B
}
COM: <s> the constructor of user details </s>
|
funcom_train/38326086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
StringBuffer buf = new StringBuffer();
buf.append("NOT CE - ");
for (int idx=0; idx < this.binds.length; idx++){
if (idx > 0){
buf.append(" && ");
}
buf.append(this.binds[idx].toBindString());
}
return buf.toString();
}
COM: <s> todo implement this to return the bind info </s>
|
funcom_train/43309432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String export(int formatIndex) {
String export = "";
StringWriter sw = new StringWriter();
try {
Template template = Velocity.getTemplate(vmFiles.get(formatIndex));
template.merge(context, sw);
} catch (Exception ex) {
System.err.println(ex.getMessage());
} finally {
export = sw.toString();
}
return export;
}
COM: <s> merges the specified format template with the context </s>
|
funcom_train/33006200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Call findCall(String dialogId){
Iterator it=imCalls.iterator();
while(it.hasNext()){
Call call=(Call)it.next();
//System.out.println("callee "+ call.getCallee());
if(call.getDialog().getDialogId().equalsIgnoreCase(dialogId))
return call;
}
it=audioCalls.iterator();
while(it.hasNext()){
Call call=(Call)it.next();
//System.out.println("callee "+ call.getCallee());
if(call.getDialog().getDialogId().equalsIgnoreCase(dialogId))
return call;
}
return null;
}
COM: <s> find an existing call with the matching dialog id in parameter </s>
|
funcom_train/1579780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSatisfaction() {
// if (mInstantReward > 40)
// mInstantReward = 40;
// if (mInstantReward < -40)
// mInstantReward = -40;
mExternalReward += mInstantReward;
if (mInstantReward > 5) activityLevel++;
if (mInstantReward < -5) activityLevel--;
double theInstantSatisfaction = getInstantSatisfaction();
mSatisfaction += theInstantSatisfaction;
mTotalSatisfaction += theInstantSatisfaction;
}
COM: <s> update the satisfaction </s>
|
funcom_train/10834708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream getInputStream() {
// implement this for files only
if (isFile()) {
try {
URL url = getURL();
if (url != null) {
return url.openStream();
}
} catch (IOException ioe) {
log.error(
"getInputStream: Cannot get input stream for " + this, ioe);
}
}
// otherwise there is no stream
return null;
}
COM: <s> returns a stream to the bundle entry if it is a file </s>
|
funcom_train/8087933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getResult(double[] incoming) throws Exception {
if (m_parameterDefs == null) {
throw new Exception("[BuiltInMath] incoming parameter structure has not been set");
}
if (!m_func.legalNumParams(incoming.length)) {
throw new Exception("[BuiltInMath] wrong number of parameters!");
}
double result = m_func.eval(incoming);
return result;
}
COM: <s> get the result of applying this function </s>
|
funcom_train/47680957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getSiblingValue(String p_name) {
Field sibling;
// obtain a reference to the first instance of the sibling
sibling = getSibling(p_name);
if (sibling == null) {
throw new IllegalArgumentException("The field \"" + getPath() + "\" does not have a sibling called \"" + p_name + QUOTE);
}
return sibling.getValue();
}
COM: <s> obtains the value of the first instance of a sibling field </s>
|
funcom_train/50846068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStart() throws Exception {
Xid xid = JDBCXID.getUniqueXid((int) Thread.currentThread().getId());
JDBCXAConnection xaConnection = newJDBCXAConnection();
JDBCXAResource testSubject = (JDBCXAResource) xaConnection.getXAResource();
int flags = 0;
testSubject.start(xid, XAResource.TMNOFLAGS);
stubTestResult();
}
COM: <s> test of start method of class jdbcxaresource </s>
|
funcom_train/15628640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDialog(@NotNull final JFrame parent) {
dialog = new JDialog(parent, ActionBuilderUtils.getString(ACTION_BUILDER, key + ".title"));
dialog.add(this);
assert dialog != null;
dialog.pack();
assert dialog != null;
dialog.setLocationRelativeTo(parent);
}
COM: <s> create the dialog </s>
|
funcom_train/46189981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBody() {
comment.setBody("");
assertEquals(null, comment.getBody());
comment.setBody(null);
assertEquals(null, comment.getBody());
comment.setBody("Here is some text");
assertEquals("Here is some text", comment.getBody());
}
COM: <s> tests the body </s>
|
funcom_train/19673563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getServer() throws DatabaseException {
Document doc = readFile();
Element root = doc.getDocumentElement();
NodeList nl = root.getElementsByTagName("server");
if (nl.getLength() == 1) {
Element el = (Element) nl.item(0);
return el.getAttribute("address");
}
else
return null;
}
COM: <s> this method returns the server stored in the configuration file </s>
|
funcom_train/37208407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OculaFrame makeView() {
final HTMLFrame hf = (HTMLFrame) createHTMLFrame();
hf.getProgressBar().setValue(0);
hf.getProgressBar().setIndeterminate(true);
loadView(hf, new Runnable() {
public void run() {
hf.getProgressBar().setValue(100);
hf.getProgressBar().setIndeterminate(false);
}
});
return hf;
}
COM: <s> creates the appropriate frame activates the progress bar and loads </s>
|
funcom_train/26177169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildPanel () {
setLayout(new BorderLayout(0, 0));
add(getHeader(), BorderLayout.NORTH);
this.content.add(getContent(), "content");
this.content.add(getHelp(), "help");
add(this.content, BorderLayout.CENTER);
add(getFooter(), BorderLayout.SOUTH);
}
COM: <s> builds the contents of the filter panel </s>
|
funcom_train/29864506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getServiceList() {
String sList = null;
Log log = Log.getInstance();
try {
sList = serviceList.toXML();
log.writeToLog("Servicelist fetched by client.", Log.INFO);
} catch (Exception e) {
log.writeToLog("Failed to fetch service list from database", Log.WARNING);
e.printStackTrace();
}
return sList;
}
COM: <s> searches for services installed on this ubi node and returns handles to theese </s>
|
funcom_train/5599195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String cleanSpecialCharacter(String s) {
if (s != null) {
s = s.replace('é', 'e');
s = s.replace('è', 'e');
s = s.replace('à', 'a');
s = s.replace('É', 'E');
}
return s;
}
COM: <s> a utility method whitch replace the special character </s>
|
funcom_train/26601950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndexPosition(int position){
if ( index == null )
return position; // for parsing of tokens, if exception then position is returned.
if ( position < index.length ){
int pos = index[position].hashCode();
parseException.setCauseOfParseException(position,null,pos);
return pos;
}
return position;
}
COM: <s> get the index position of token in query which get failed </s>
|
funcom_train/38259148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void identifyLeafs(ProofNode currentNode) {
if (currentNode.getType() == 3) {
// this is a leaf
fifoProofNode.push(currentNode);
} else {
if (currentNode.getLeft() != null) {
identifyLeafs(currentNode.getLeft());
}
if (currentNode.getRight() != null) {
identifyLeafs(currentNode.getRight());
}
}
}
COM: <s> identify all the leafs of the current subtree </s>
|
funcom_train/35669183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVoice(int index) {
try {
Voice voice = (Voice) voiceList.getElementAt(index);
if (voice != null) {
float oldVolume = getVolume();
float oldSpeakingRate = getSpeakingRate();
synthesizer.waitEngineState(Synthesizer.QUEUE_EMPTY);
synthesizer.getSynthesizerProperties().setVoice(voice);
setVolume(oldVolume);
setSpeakingRate(oldSpeakingRate);
voiceList.setSelectedItem(voice);
}
} catch (PropertyVetoException pve) {
pve.printStackTrace();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
COM: <s> sets the voice at the given to use </s>
|
funcom_train/16676616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDropListener(IPartDropListener listener) {
if (listener == null){
return;
}
if (dropListeners == null) {
dropListeners = new IPartDropListener[1];
dropListeners[0] = listener;
}
else {
IPartDropListener[] newDropListeners = new IPartDropListener[dropListeners.length + 1];
System.arraycopy(dropListeners, 0, newDropListeners, 0,
dropListeners.length);
newDropListeners[dropListeners.length] = listener;
dropListeners = newDropListeners;
}
}
COM: <s> adds the listener to receive events </s>
|
funcom_train/25033952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readOnlyMetaInformationHeader(DicomInputStream i) throws IOException, DicomException {
read(i,i.getByteOffsetOfStartOfData(),0xffffffffl,true,null);
//System.err.println("readOnlyMetaInformationHeader(): afterwards i.areReadingDataSet()="+i.areReadingDataSet());
// important that i.areReadingDataSet() be true at this point ... triggers check for codec if read (or copied) further
}
COM: <s> p read the meta information header if present and then stop </s>
|
funcom_train/19036510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PostCollection getPosts(PIDCollection pids) {
PostCollection posts = new PostCollection();
if(posts != null) {
Post tempPost;
for(int i = 0 ; i < pids.size(); i++) {
tempPost = this.getPost(pids.getPIDAt(i));
if(tempPost != null) {
posts.addPost(tempPost);
}
}
}
return posts;
}
COM: <s> returns all of the posts associated with the provided post ids </s>
|
funcom_train/25566735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command createCommand(final String commandName, final MethodCall call){
return new Command(){
public String getName(){ return commandName; }
public void execute(Object specification){ executeCommand(commandName, call); }
public Command createReverseCommand(){ return null; }
public void setEnabled(boolean enabled){}
public void setEnabledIfNeeded(){}
public boolean isEnabled(){ return true; }
};
}
COM: <s> create simple stateless command cant be disabled </s>
|
funcom_train/34998658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lockUnlock(int[] topicIds, ModerationLog moderationLog) {
if (ArrayUtils.isEmpty(topicIds)) {
return;
}
for (int topicId : topicIds) {
Topic topic = this.topicRepository.get(topicId);
if (topic.isLocked()) {
topic.unlock();
}
else {
topic.lock();
}
}
this.moderationLogService.registerLockedTopics(moderationLog, topicIds);
}
COM: <s> lock or unlock a set of topics </s>
|
funcom_train/28296776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntryChangeData() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
dvm.set(entry);
TestListener listener = new TestListener();
dvm.addListener(listener);
entry.changeData(IsClassOf.class, IsClassOf.NAME);
assertEquals(IsClassOf.class, entry.getDataClass());
assertEquals(IsClassOf.NAME, entry.getDataName());
assertTrue(listener.wasChanged());
}
COM: <s> test entry change data </s>
|
funcom_train/32368579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindStatusPublished() {
String testName = "findStatusPublished";
if (logger.isInfoEnabled()) {
logger.info("\n\t\tRunning Test: " + testName);
}
StudyStatusHome fixture = getStudyStatusHome();
StudyStatus result = fixture.findStatusPublished();
// verify
assertTrue(result != null);
assertTrue(result.isPublished());
if (logger.isInfoEnabled()) {
logger.info(testName + " verified.");
}
}
COM: <s> run the study status find status published method test </s>
|
funcom_train/50865150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void goToNearestSettlement() {
if (mission instanceof VehicleMission) {
VehicleMission vehicleMission = (VehicleMission) mission;
try {
Settlement nearestSettlement = vehicleMission.findClosestSettlement();
if (nearestSettlement != null) {
vehicleMission.clearRemainingNavpoints();
vehicleMission.addNavpoint(new NavPoint(nearestSettlement.getCoordinates(), nearestSettlement,
nearestSettlement.getName()));
vehicleMission.associateAllMembersWithSettlement(nearestSettlement);
vehicleMission.updateTravelDestination();
endCollectionPhase();
}
}
catch (Exception e) {}
}
}
COM: <s> go to the nearest settlement and end collection phase if necessary </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.