__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/18517174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adaptToPreferenceChange(PropertyChangeEvent event) {
if (this.codeScanner.affectsPresentation(event)) {
this.codeScanner.adaptToPreferenceChange(event);
}
if (this.commentScanner.affectsPresentation(event)) {
this.commentScanner.adaptToPreferenceChange(event);
}
if (this.stringScanner.affectsPresentation(event)) {
this.stringScanner.adaptToPreferenceChange(event);
}
}
COM: <s> adapts the behavior of the contained components to the change according </s>
|
funcom_train/4823132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getP1Pnl() {
if (p1Pnl == null) {
p1IconLbl = new JLabel();
p1IconLbl.setIcon(Team.X.getIcon(false));
p1IconLbl.setText(" ");
p1Pnl = new JPanel();
p1Pnl.setLayout(new BorderLayout());
p1Pnl.setBorder(BorderFactory.createTitledBorder("Player 1"));
p1Pnl.add(p1IconLbl, BorderLayout.WEST);
p1Pnl.add(getP1InfoPnl(), BorderLayout.EAST);
}
return p1Pnl;
}
COM: <s> this method initializes p1 pnl </s>
|
funcom_train/50896909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int find (int iCol, String sVal) throws UnsupportedEncodingException {
int iFound = -1;
int r = 0;
while (r<iRows) {
if (getField(iCol,r).equals(sVal)) {
iFound = r;
break;
}
} // wend
return iFound;
} // find
COM: <s> p find first occurence of a value at a given column p </s>
|
funcom_train/306894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
super.run();
try {
try {
while (RUNNING) {
Socket socket = serverSocket.accept();
try {
printlog("Accepted Socket: " + socket);
new Connection(socket, this);
} catch (IOException e) {
socket.close();
}
}
} finally {
serverSocket.close();
}
} catch (Exception e) {
this.printlog("A major error has occured\n" + e);
System.exit(-1);
}
}
COM: <s> handles listening for new connections and launching client threads </s>
|
funcom_train/36359709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer3() {
if (spacer3 == null) {//GEN-END:|65-getter|0|65-preInit
// write pre-init user code here
spacer3 = new Spacer(16, 1);//GEN-LINE:|65-getter|1|65-postInit
// write post-init user code here
}//GEN-BEGIN:|65-getter|2|
return spacer3;
}
COM: <s> returns an initiliazed instance of spacer3 component </s>
|
funcom_train/3611869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printProperties(Properties myProp){
Enumeration enum;
String theKey;
enum = myProp.keys();
if(enum == null) {
printMessage("No items");
return;
}
while(enum.hasMoreElements()){
theKey = (String) enum.nextElement();
printMessage(theKey + " = " + myProp.getProperty(theKey));
}
}
COM: <s> prints out the properties passed to it </s>
|
funcom_train/10820610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDatePartitionDir() throws IOException {
datePartitionDir = new File(baseDir, "dateParitionDir");
assertTrue(datePartitionDir.mkdirs());
// for each date partition create a directory
for (String partition : datePartitions) {
File datePartition = new File(datePartitionDir, partition);
assertTrue(datePartition.mkdirs());
for (TYPE fileType : fileTypes) {
writeFile(datePartition, fileType);
}
}
}
COM: <s> write out date partitioned directories with one file per file type type </s>
|
funcom_train/43894617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Set allLocks() {
synchronized (lockTables) {
Set set = new HashSet();
Map fidLocks;
for (Iterator i = lockTables.values().iterator(); i.hasNext();) {
fidLocks = (Map) i.next();
set.addAll(fidLocks.values());
}
return set;
}
}
COM: <s> set of all locks </s>
|
funcom_train/48796125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseCustom(String s, KeyValParserClientIF caller) {
Debug.Enter("u", "KeyValParser::parseCustom(str, caller)");
parseCustom(s, caller, "");
Debug.Exit("u", "KeyValParser::parseCustom(str, caller)");
}
COM: <s> allows special handling during parsing </s>
|
funcom_train/50849437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTextRenderer(String fontFace, int fontSize) {
if (null == fontFace) {
fontFace = "SansSerif";
}
Font font = new Font(fontFace, Font.PLAIN, fontSize);
TextRenderer renderer = new TextRenderer(font, true, true);
rendererList.add(renderer);
}
COM: <s> adds a renderer for the required font size </s>
|
funcom_train/951408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
super.actionPerformed(e);
if (e.getActionCommand().equals("User Database")) {
UserDatabaseDialog userDbDialog = new UserDatabaseDialog(getFrame(), this, this.caa);
userDbDialog.init();
}
else if (e.getActionCommand().equals(("Revocation List"))) {
CustomerRevocationListDialog dialog = new CustomerRevocationListDialog(getFrame(), this.caa.getRevocationList());
dialog.init();
}
}
COM: <s> reacts on all user actions within the control panel </s>
|
funcom_train/27840491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPackageDescription(String NPackageDesc) {
if (NPackageDesc != null) {
packageDescription = NPackageDesc;
setFileProducerEnabled("Package", (packageDescription.length() > 0));
Prefs.getInstance().set("generator", "packageDescription", packageDescription);
} else {
packageDescription = "";
}
}
COM: <s> sets the package description </s>
|
funcom_train/20508059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToCatalogTagCloud(String catalog, List<TagCloudEntry> recent) {
CatalogTagCloud catalogTagCloud = catalogTagClouds.get(catalog);
if (null == catalogTagCloud) {
catalogTagCloud = new CatalogTagCloud();
}
catalogTagCloud.setRecent(recent);
catalogTagClouds.put(catalog, catalogTagCloud);
}
COM: <s> add a recent cloud to the catalog holder </s>
|
funcom_train/47140242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccelerator (KeyStroke ks) {
m_ksKeyStroke = ks;
synchronized (getPeerLock()) {
if (m_jmiPeer != null) {
m_jmiPeer.setAccelerator (ks);
}
if (m_jmMenuPeer != null) {
m_jmMenuPeer.getItem(0).setAccelerator (ks);
}
}
}
COM: <s> set the accelerator of this menu sheet item </s>
|
funcom_train/36550551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Dialog onCreateDialog(int id) {
Dialog dialog;
switch(id) {
case GlobalConstants.DIALOG_HELP_ID:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.add_schedule_help)
.setCancelable(false)
.setTitle("Direction")
.setNeutralButton(R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
dialog = builder.create();
break;
default:
dialog = null;
}
return dialog;
}
COM: <s> create a dialog for direction </s>
|
funcom_train/47206333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasicMutationGraftCopolymer(){
graftCopolymerPanel = new GraftCopolymerPanel();
graftCopolymerPanel.setDegreeofPolymerizationBranch(3);
graftCopolymerPanel.setDegreeofPolymerizationMain(2);
graftCopolymerPanel.setTorsionAngle(22.9);
assertEquals(3,graftCopolymerPanel.getDegreeofPolymerizationBranch());
assertEquals(2,graftCopolymerPanel.getDegreeofPolymerizationMain());
assertEquals(22.9,graftCopolymerPanel.getTorsionAngle());
}
COM: <s> test basic mutation for graft copolymer class </s>
|
funcom_train/7759462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRelaySeedingURIs(Set seedURIs) {
relayConfig.clearSeedingURIs();
for (Iterator it = seedURIs.iterator(); it.hasNext();) {
String seedStr = (String) it.next();
relayConfig.addSeedingURI(URI.create(seedStr));
}
}
COM: <s> sets the relay seeds represented as strings </s>
|
funcom_train/9703256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws MojoExecutionException {
getLog().info("Deploying AAR artifact "+project.getArtifact().getFile()+" to Axis2 Web Console "+axis2AdminConsoleURL);
try {
deploy(project.getArtifact().getFile());
} catch(MojoExecutionException e) {
throw e;
} catch (Exception e) {
throw new MojoExecutionException("Error deploying aar", e);
}
}
COM: <s> executes the deploy aar mojo on the current project </s>
|
funcom_train/17849921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setText(Localizer.getLocalization(Localizer.I18N_OK));
okButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
validateInput();
}
});
}
return okButton;
}
COM: <s> this method initializes ok button </s>
|
funcom_train/26574063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String xmlRequirementRelation(RequirementRelation relation) {
String strXML = "<relation "
+ " from=\"R" + relation.getFromRequirementPK() + "\" "
+ " to=\"R" + relation.getToRequirementPK() + "\" "
+ xmlRequirementRelationType(relation.getTypePK()) + "/>\n";
return strXML;
}
COM: <s> method xml requirement relation </s>
|
funcom_train/28151289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recursiveAddFormula(Expr x) throws Err {
if (x instanceof ExprList && ((ExprList)x).op==ExprList.Op.AND) {
for(Expr e: ((ExprList)x).args) recursiveAddFormula(e);
} else {
frame.addFormula(cform(x), x);
}
}
COM: <s> break up x into conjuncts then add them each as a fact </s>
|
funcom_train/46639694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
// Register single click bindings
uiBindingRegistry.registerSingleClickBinding(
new ColumnHeaderClickEventMatcher(SWT.NONE, 1), new SortColumnAction(false));
uiBindingRegistry.registerSingleClickBinding(
MouseEventMatcher.columnHeaderLeftClick(SWT.ALT), new SortColumnAction(true));
}
COM: <s> remove the original key bindings and implement new ones </s>
|
funcom_train/3153816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stashURL(String urlString) throws DTSException {
//System.err.println("Stashing " + urlString);
java.net.URL url = getURL(urlString);
if (!filesMap.containsKey(url.toString())) {
filesMap.put(url.toString(), new Integer(0));
//System.err.println("Stashed " + url.toString());
}
}
COM: <s> stash a document url in the dtsimpl documents map </s>
|
funcom_train/21112022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Credentials c){
if (!(c instanceof RoleBasedCredentials)){
return super.contains(c); // that method knows how to handle the situation
}
RoleBasedCredentials rbc = (RoleBasedCredentials)c;
return roleType.intern()==rbc.getRoleType().intern() &&
(roleValue==null || roleValue.equals(rbc.getRoleValue()));
}
COM: <s> this method implements comparison of a credential to this object </s>
|
funcom_train/17141037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getGlobalTermWeight(Term term) {
try {
return (float) Math.pow(indexReader.docFreq(term), -0.05);
} catch (IOException e) {
logger.info("Couldn't get term weight for term '" + term.text() + "'");
return 1;
}
}
COM: <s> gets the global term weight for a term used in query weighting </s>
|
funcom_train/8166826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Operator getSymbol(String symbol) {
if (Operator.POUND.toString().equals(symbol)) {
return Operator.POUND;
} else if (Operator.DOT.toString().equals(symbol)) {
return Operator.DOT;
}
if (Operator.DOLLAR.toString().equals(symbol)) {
return Operator.DOLLAR;
}
if (Operator.COLON.toString().equals(symbol)) {
return Operator.COLON;
}
// default, return null
return null;
}
COM: <s> convert a symbol to an operator </s>
|
funcom_train/14505835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test08truststoreTypeJKS() throws Exception {
final String truststoreType = "JKS";
// Setup workers
addRenewalWorker(6101, "RenewalWorker_6101", truststoreType);
addSigner(SIGNERID_6102, SIGNER_6102, SIGNER_6102_ENDENTITY);
// Setup EJBCA end entity
mockSetupEjbcaSearchResult();
doRenewalFirstTime();
}
COM: <s> tests renewal of key and certificate for a worker </s>
|
funcom_train/12561623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintDisplayable(int x, int y, int w, int h) {
// We mark the body layer as dirty
if (alertLayer.visible) {
alertLayer.addDirtyRegion(x, y, w, h);
} else {
bodyLayer.addDirtyRegion(x, y, w, h);
}
requestRepaint();
}
COM: <s> request a repaint of a region of the current displayable </s>
|
funcom_train/23678410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferencedTablePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ForeignKey_referencedTable_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ForeignKey_referencedTable_feature", "_UI_ForeignKey_type"),
MetadataPackage.Literals.FOREIGN_KEY__REFERENCED_TABLE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the referenced table feature </s>
|
funcom_train/3645234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void andNot(BitSet set) {
int unitsInCommon = Math.min(unitsInUse, set.unitsInUse);
// Perform logical (a & !b) on bits in common
for (int i = 0; i < unitsInCommon; i++) {
bits[i] &= ~set.bits[i];
}
recalculateUnitsInUse();
}
COM: <s> clears all of the bits in this code bit set code whose corresponding </s>
|
funcom_train/16312333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
try {
return doResolve(publicId, systemId);
} catch (URISyntaxException e) {
throw new SAXException(e);
} catch (IOException e) {
throw new SAXException(e);
} catch (TranslationException e) {
throw new SAXException(e);
}
}
COM: <s> resolves an external entity </s>
|
funcom_train/18648027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPropertyName(String propName) {
StringBuffer ret=new StringBuffer();
for (int i=0; i < propName.length(); i++) {
char ch=propName.charAt(i);
if (i == 0) {
ret.append(Character.toUpperCase(ch));
} else {
if (Character.isUpperCase(ch)) {
ret.append(' ');
}
ret.append(ch);
}
}
return(ret.toString());
}
COM: <s> this method returns a displayable version of the supplied </s>
|
funcom_train/28633979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndTime(long endTime) {
this.endTime = endTime;
// check if inited
if ((this.startTime != -1) && (this.endTime != -1)) {
// notify interested parties that inited
setChanged();
notifyObservers(INIT);
sendNavigationEventToListeners(NavigationEvent.INIT);
}
}
COM: <s> sets the end time of the data in questions </s>
|
funcom_train/48525846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getPrefixLength(String a, String b, int max) {
int i=0;
for (; (i<a.length()-1) && (i<b.length()-1) && (i<max); i++)
if (a.charAt(i) != b.charAt(i))
return i;
return i;
}
COM: <s> method which takes in two strings and returns the length of the </s>
|
funcom_train/12639794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void leaveGroup(InetAddress mcastaddr) throws IOException {
if (isClosed()) {
throw new SocketException("Socket is closed");
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkMulticast(mcastaddr);
}
if (!mcastaddr.isMulticastAddress()) {
throw new SocketException("Not a multicast address");
}
getImpl().leave(mcastaddr);
}
COM: <s> leave a multicast group </s>
|
funcom_train/17788939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSignedPixels(int sampleType,int zSize){
signedPixels = new int[zSize];
for(int z = 0; z < zSize; z++){
if(sampleType == 3 || sampleType == 4 || sampleType == 5 ||
sampleType == 6 || sampleType == 7 ){
signedPixels[z] = 1;
} else {
signedPixels[z] = 0;
}
}
}
COM: <s> indicates if the loaded image has signed pixels </s>
|
funcom_train/22278712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawTiled(Graphics g, int x, int y, int width, int height) {
if (!isValid()) {
System.err.println("Graphics.drawBitmapTiled() - Invalid bitmap: "+
name());
return;
}
super.drawTiled(g, x, y, width, height);
}
COM: <s> overridden to generate an error message just like the other image </s>
|
funcom_train/4553276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String next(int n) throws JSONException {
if (n == 0) {
return "";
}
char[] chars = new char[n];
int pos = 0;
while (pos < n) {
chars[pos] = next();
if (end()) {
throw syntaxError("Substring bounds error");
}
pos += 1;
}
return new String(chars);
}
COM: <s> get the next n characters </s>
|
funcom_train/17976602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel2() {
if (jPanel2 == null) {
GridLayout gridLayout1 = new GridLayout();
gridLayout1.setRows(4);
jPanel2 = new JPanel();
jPanel2.setLayout(gridLayout1);
jPanel2.add(getJTextFieldName(), null);
jPanel2.add(getJComboBoxType(), null);
jPanel2.add(getJTextFieldScale(), null);
jPanel2.add(getJCheckBoxCommunicating(), null);
}
return jPanel2;
}
COM: <s> this method initializes j panel2 </s>
|
funcom_train/10984006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNext() {
if (_rs == null)
return false;
if (_primed)
return true;
try {
_primed = _rs.next();
return _primed;
} catch (SQLException sql) {
String msg = "An exception occurred reading from the Iterator. Cause: " + sql;
LOGGER.error(msg, sql);
IllegalStateException e = new IllegalStateException(msg);
e.initCause(sql);
throw e;
}
}
COM: <s> check for a subsequent item in the result set </s>
|
funcom_train/3525831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printComponentTree(Container parent, String level) {
Component[] children = parent.getComponents();
for (int i = 0; i < children.length; i++) {
System.out.println(level + children[i]);
if (children[i] instanceof Container) {
printComponentTree((Container) children[i], level + " ");
}
}
}
COM: <s> prints the component tree contents to the console </s>
|
funcom_train/51129286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transformVector2Ds(Vector2D v) {
double tempX = (this._11 * v.x) + (this._21 * v.y) + (this._31);
double tempY = (this._12 * v.x) + (this._22 * v.y) + (this._32);
v.x = tempX;
v.y = tempY;
}
COM: <s> transform vector2 ds </s>
|
funcom_train/47572590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtInicioDia() {
if (txtInicioDia == null) {
txtInicioDia = new JTextField();
txtInicioDia.setPreferredSize(new Dimension(20, 20));
txtInicioDia.setLocation(new Point(5, 5));
txtInicioDia.setSize(new Dimension(20, 20));
txtInicioDia.setToolTipText("dd/mm/yyyy");
txtInicioDia.setText("02");
}
return txtInicioDia;
}
COM: <s> this method initializes txt inicio dia </s>
|
funcom_train/12176956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MultiByteInteger length() throws WBSAXException {
if (length == null) {
byte[] content = getContent();
int intLength;
if (content == null || content.length == 0) {
intLength = 0;
} else {
intLength = content.length;
}
length = new MultiByteInteger(intLength);
}
return length;
}
COM: <s> returns the physical size of the string table i </s>
|
funcom_train/3304400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void discoverRepositeries() {
// TODO implement RepositeryController.discoverRepositeries()
String targetOs = System.getProperty("os.name").toLowerCase();
if (targetOs.indexOf("nt") > -1 || targetOs.indexOf("windows") > -1) {
} else {
// TODO support unix
}
}
COM: <s> discover content repositeries </s>
|
funcom_train/33897926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addElement(Object element) {
if (fElements.contains(element)) {
return;
}
fElements.add(element);
if (isOkToUse(fTreeControl)) {
fTree.add(this, element);
fTree.expandToLevel(element, fTreeExpandLevel);
}
dialogFieldChanged();
}
COM: <s> adds an element at the end of the tree list </s>
|
funcom_train/42065395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void edit(List<Customer> customerList, List<CustomerDetails> customerDetailsList) {
for (Customer customer : customerList) {
em.persist(em.merge(customer));
//em.persist(em.merge(customerDetailsList.get(customerList.indexOf(customer))));
}
}
COM: <s> updates an existing set of records in the customer relation </s>
|
funcom_train/2040429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream readFile(String fileName) {
try {
return ctx.getAssets().open("fixture/" + fileName + ".xml");
} catch (IOException e) {
fail("Can't read file: " + "assets/fixture/" + fileName + ".xml");
return null;
}
}
COM: <s> read fixture file the file is end with </s>
|
funcom_train/28123264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
try {
FileInputStream in = new FileInputStream(recentlyUsedItemsFile);
XMLDecoder decoder = new XMLDecoder(in);
recentlyUsed = (Vector)decoder.readObject();
} catch (Exception e) {
System.out.println("Unable to load list of recently used projects: " + e.toString());
}
setupMenu();
}
COM: <s> load list of recently used items </s>
|
funcom_train/165471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayName() {
String name = getValue(DETAILS[1]);
String surname = getValue(DETAILS[2]);
if (name.equals("") && surname.equals("")) {
return isGuest() ? "guest" : getUsername();
}
if (name.equals("")) {
return surname;
}
if (surname.equals("")) {
return name;
}
return name + " " + surname;
}
COM: <s> returns a string suitable to describe the user </s>
|
funcom_train/10482097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLine(String line) {
if (lines == null) {
lines = new ArrayList();
lines.add(message);
}
// mark if we're still continued
continued = line.charAt(3) == '-';
// add the line to the list
lines.add(line.substring(4));
}
COM: <s> add a line to a continued response </s>
|
funcom_train/35657638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() throws Exception{
/*
XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(new FileOutputStream("kTour.xml")));
encoder.writeObject(kTour);
encoder.close();
*/
FileWriter fWriter = null;
try {
fWriter = new FileWriter(new File("kTour.xml"));
fWriter.write(kTour.toXML());
fWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> save method allows the player to save the kinghts tour game anytime </s>
|
funcom_train/181438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean skipElement(String element) {
return (currentBasket == null) ||
/* element.equals(InterlisSerializer.ELEMENT_TRANSFER) ||
element.equals(InterlisSerializer.ELEMENT_HEADERSECTION) ||
element.equals(InterlisSerializer.ELEMENT_ALIAS) ||
element.equals(InterlisSerializer.ELEMENT_DATASECTION) ||
*/
// non INTERLIS-defined tags
element.equals(XmlEncoder.ELEMENT_CODE);
}
COM: <s> skip a parsed element might be there for formatting or other reasons only </s>
|
funcom_train/11392324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addContext(String pathSpec, String dir, boolean isFiltered) throws IOException {
if (0 == webServer.getHandlers().length) {
throw new RuntimeException("Couldn't find handler");
}
WebAppContext webAppCtx = new WebAppContext();
webAppCtx.setContextPath(pathSpec);
webAppCtx.setWar(dir);
addContext(webAppCtx, true);
}
COM: <s> add a context </s>
|
funcom_train/42710452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getNext() {
while(!todo.isEmpty()) {
Object item = todo.remove();
if(item instanceof ItemBoundable) {
Object next = ((ItemBoundable)item).getItem();
if(next != null)
return next;
}
else {
List<?> kids = ((AbstractNode)item).getChildBoundables();
todo.addAll(kids);
}
}
return null;
}
COM: <s> find the next valid data object </s>
|
funcom_train/4920394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOfficeFloorObject() {
// Add two different managed objects verifying details
this.replayMockObjects();
OfficeObject mo = this.node.addOfficeObject("MO",
Connection.class.getName());
assertNotNull("Must have managed object", mo);
assertEquals("Incorrect managed object name", "MO",
mo.getOfficeObjectName());
assertNotSame("Should obtain another managed object", mo,
this.node.addOfficeObject("ANOTHER", String.class.getName()));
this.verifyMockObjects();
}
COM: <s> tests adding an </s>
|
funcom_train/27712513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decreaseDepth() throws Exception {
if (fElementDepth > 0) {
int offset = fNamespaceMappings[fElementDepth][0];
while (offset > 1) {
offset -= 2;
fHandler.endNamespaceDeclScope(fNamespaceMappings[fElementDepth][offset]);
}
}
fElementDepth--;
}
COM: <s> remove a namespace mappng </s>
|
funcom_train/26227792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CType getElementType() {
verify(baseType != null);
verify(!(baseType instanceof CArrayType));
if (arrayBound == 1) {
return baseType;
} else {
CArrayType arrayType = new CArrayType(baseType, arrayBound - 1);
arrayType.setClass(getCClass());
return arrayType;
}
}
COM: <s> returns the type of the elements of an array of this type </s>
|
funcom_train/30196765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCurriculumVitae() {
System.out.println("setCurriculumVitae");
CurriculumVitae curriculumVitae = null;
PatenteCv instance = new PatenteCv();
instance.setCurriculumVitae(curriculumVitae);
CurriculumVitae result = instance.getCurriculumVitae();
assertEquals(null, result);
}
COM: <s> test of set curriculum vitae method of class com </s>
|
funcom_train/3833883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MapOperationFactor getSelectedPanFactor() {
MapOperationFactor ms = (MapOperationFactor)offeredPanFactors.get( 0 );
for ( int i = 0; i < offeredPanFactors.size(); i++ ) {
MapOperationFactor tmp = (MapOperationFactor)offeredPanFactors.get( i );
if ( tmp.isSelected() ) {
ms = tmp;
break;
}
}
return ms;
}
COM: <s> returns the pan factor that is marked as selected </s>
|
funcom_train/39102664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(CreatorMapEntry entry) {
Hashtable table = (entry.isEditor() ? editorCreatorTable : viewerCreatorTable);
CreatorMapEntry existingEntry = (CreatorMapEntry) table.get(entry.getViewableClassName());
if (existingEntry == null) {
table.put(entry.getViewableClassName(), entry);
} else {
existingEntry.merge(entry);
}
}
COM: <s> register by creator map entry </s>
|
funcom_train/9569379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUsageRights() {
PdfDictionary perms = catalog.getAsDict(PdfName.PERMS);
if (perms == null)
return;
perms.remove(PdfName.UR);
perms.remove(PdfName.UR3);
if (perms.size() == 0)
catalog.remove(PdfName.PERMS);
}
COM: <s> removes any usage rights that this pdf may have </s>
|
funcom_train/33705360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configurationChanged(BndConfigurationChangeEvent e) {
IDocumentProvider provider = getDocumentProvider();
String oldContent = provider.getDocument(getEditorInput()).get();
String newContent = this.editor.getModel().toString();
if (!oldContent.equals(newContent)) {
provider.getDocument(getEditorInput()).set(newContent);
}
}
COM: <s> updates the document if the model has changed </s>
|
funcom_train/34534713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D getPerimeterPoint(EdgeView edge, Point2D source, Point2D p) {
if (getRenderer() instanceof BulletRenderer)
return ((BulletRenderer)getRenderer()).getPerimeterPoint(this, source, p);
return super.getPerimeterPoint(edge, source, p);
}
COM: <s> from jgraphpad jgraph round rect view </s>
|
funcom_train/18513806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMaxNbAttribute() {
// gets the node where the information is
Element openFiles = (Element) getChildByName(setup, OPEN_FILES_ELEMENT);
if (openFiles == null) { return; }
openFiles.setAttribute(MAX_NB_ATTRIBUTE, String
.valueOf(DEFAULT_MAX_NB_ATTRIBUTE));
}
COM: <s> this adds an attribute max nb to the open files node </s>
|
funcom_train/5872929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlotEvent(OccurEvent oe) {
if (_addEvtList == null)
_addEvtList = new LinkedList();
_addEvtList.add(oe);
if (getAttribute(ATTR_ON_ADD_EVENT_RESPONSE) == null) {
setAttribute(ATTR_ON_ADD_EVENT_RESPONSE, Boolean.TRUE);
Events.postEvent(-20000, "onAddEventResponse", this, null);
}
}
COM: <s> add an occur event to the plotinfo </s>
|
funcom_train/35082798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIntParameter(String name) throws NumberFormatException {
if (params == null || !params.containsKey(name)) {
throw new NumberFormatException("No value for parameter named '" + name + "'.");
}
return Integer.decode((String) params.get(name)).intValue();
}
COM: <s> get the value of a specified parameter as an integer </s>
|
funcom_train/49052837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContexts (String[] values) {
// First delete the existing learning resource types.
JAXBPath.deleteJaxbObject ("/Educational/Context[]", getLom());
// Now add the learning resource types from the array.
for (int i=0; i < values.length; i++) {
addContext (values[i]);
}
}
COM: <s> replace the existing list of educational contexts with the values </s>
|
funcom_train/41961174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SetProperty(String PropertyKey, String PropertyValue) {
Props.setProperty(PropertyKey,PropertyValue);
try {
Props.store(new FileOutputStream(new File( PropsPath )), "comments");
} catch ( Exception e) {
ortus.api.DebugLog(INFO, "SetProps Exception: " + e );
}
}
COM: <s> set the value of a property </s>
|
funcom_train/48390121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StatefulCanvas getTabCanvas () {
if (tabSet == null) return null;
JavaScriptObject canvasJS = this.getTabCanvasJS(tabSet.getJsObj(), this.getJsObj());
if (canvasJS == null) return null;
return StatefulCanvas.getOrCreateRef(canvasJS);
}
COM: <s> returns the live canvas used to represent this tab in a tab set </s>
|
funcom_train/44448625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSound(byte[] input, boolean wasActive) {
boolean isSound = false;
double energy = energy(input);
if (outputCounter++ > DO_DISPLAY) {
Log.println("Current energy: " + energy);
notifyChangeWaiters();
outputCounter = 0;
}
if (energy > threshold * envNoise) {
isSound = true;
pauseCounter = 0;
}
if (wasActive && allowed_pause >= pauseCounter) {
pauseCounter++;
isSound = true;
} else {
pauseCounter = 0;
}
return isSound;
}
COM: <s> decides if the input is sound or just noise </s>
|
funcom_train/7243488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void assertInstanceof(String msg, Class expected, Object actual) {
if (!instanceofCheck(expected, actual))
fail(formatComparison(INSTANCE_OF, msg,
expected.getName(), actual == null ? "null" : actual.getClass().getName()));
}
COM: <s> asserts that actual is an instance of the class expected </s>
|
funcom_train/31874983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void login (String uid, String pass) {
this.out.println (COMM_HEAD);
this.out.println (COMM_ACTION + ": " + COMM_LOGIN);
this.out.println (COMM_UID + ": " + uid);
this.out.println (COMM_PASS + ": " + pass);
this.out.println (COMM_HOSTNAME + ": " + locator.getHostname());
this.out.println (COMM_PORT + ": " + locator.getPort());
this.out.println (HEADER_END);
this.out.flush();
}
COM: <s> authentificates an existing user with the remote platform </s>
|
funcom_train/24938371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stateGlobalTimer(Module module, StateMachine mach) {
// Run the global timer every cycle from the start.
ProceduralTimingBlock ptb = new ProceduralTimingBlock(new EventControl(
new EventExpression.PosEdge(mach.getClock())),
new Assign.NonBlocking(this.globalTime,
new net.sf.openforge.verilog.model.Math.Add(
this.globalTime, new Constant(1,
this.globalTime.getWidth()))));
module.state(new Always(ptb));
}
COM: <s> generates the global timer </s>
|
funcom_train/36243192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Task deleteFragment(IExosTaskEventListener listener, int accountId, String fragmentId){
log.debug("delete fragment: "+fragmentId);
try{
SetFragmentTask task = new SetFragmentTask(listener, accountId, fragmentId);
queue.addTask(task);
return task;
} catch (Exception ex) {
log.fatal(ex.getMessage(), ex);
}
return null;
}
COM: <s> creates a task to delete a fragment for an account </s>
|
funcom_train/51538157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSockOpt(int option) throws IOException {
switch (option) {
case SocketConnection.DELAY:
return socket.getTcpNoDelay() ? 1 : 0;
case SocketConnection.KEEPALIVE:
return socket.getKeepAlive() ? 1 : 0;
case SocketConnection.LINGER:
if (socket.getSoLinger() == -1) {
return 0;
}
return socket.getSoLinger();
case SocketConnection.RCVBUF:
return socket.getReceiveBufferSize();
case SocketConnection.SNDBUF:
return socket.getSendBufferSize();
}
return -1;
}
COM: <s> gets the requested socket option </s>
|
funcom_train/25026119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTag(String tag) {
if (tag.length() > 32) {
throw new IllegalArgumentException
("Tag may be at most 32 characters");
}
if (tag.indexOf(' ') >= 0) {
throw new IllegalArgumentException("Tag must not contain spaces");
}
this.tag = tag;
}
COM: <s> sets the tag </s>
|
funcom_train/23777904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
count = 0;
try {
Thread.currentThread().sleep(100);
for (int i = 0; i < 20; i++) {
count = i;
fullscreen.repaint();
Thread.currentThread().sleep(100);
}
} catch (InterruptedException iex) {
iex.printStackTrace();
}
System.exit(0);
}
COM: <s> run the dissolver </s>
|
funcom_train/37482862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getElement(String symbol) throws NuclearException {
final Integer zInt = (symbol == null || symbol.length() == 0) ? null
: (Integer) ZTOSYMBOLMAP.get(capitalizeSymbol(symbol));
if (zInt == null) {
final StringBuffer message = new StringBuffer(
"No element found for symbol: ");
message.append(symbol);
throw new NuclearException(message.toString());
}
return zInt.intValue();
}
COM: <s> lookup method for obtaining an atomic number from the elements symbol </s>
|
funcom_train/50864903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent e) {
int index = equipmentTable.getSelectedRow();
Object selectedEquipment = equipmentTable.getValueAt(index, 0);
if ((selectedEquipment != null) && (selectedEquipment instanceof Equipment))
desktop.openUnitWindow((Equipment) selectedEquipment, false);
}
COM: <s> called whenever the value of the selection changes </s>
|
funcom_train/4715452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void bindDetail2Text(LinearLayout viewP, final Detail2Text detailP) {
// The value 1 of the detail
TextView value = (TextView) viewP.findViewById(R.id.id_detail_value1);
value.setText(detailP.getValue1());
// The value 2 of the detail
value = (TextView) viewP.findViewById(R.id.id_detail_value2);
value.setText(detailP.getValue2());
}
COM: <s> bind torrents data with widget for a detail2 text instance </s>
|
funcom_train/39366675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HuffNode buildHuffmanTree() {
int i;
HuffNode root, z;
root = new HuffNode();
root.left = root.right = null;
root.info = -1;
for ( i=0; i<=MAXVALUE; i++ ) {
if (_huffLen[i] != 0) z = HuffCoder.addTree(root, _huffCode[i], _huffLen[i], i);
}
return root;
}
COM: <s> builds the huffman tree </s>
|
funcom_train/4853629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLabel (String name) {
Object obj = getObjectLabel (name);
if (obj == null)
return null;
else if (obj instanceof Region[])
return null; // NIY
else if (obj instanceof Region)
return ((Region)obj).toText ();
else
return obj.toString();
}
COM: <s> get a labels value </s>
|
funcom_train/34271844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyToStatusLine(final IStatus status) {
String message = status.getMessage();
if (message.length() == 0) {
message = null;
}
switch (status.getSeverity()) {
case IStatus.OK:
setErrorMessage(null);
this.setMessage(message);
break;
case IStatus.WARNING:
setErrorMessage(null);
this.setMessage(message, WizardPage.WARNING);
break;
case IStatus.INFO:
setErrorMessage(null);
this.setMessage(message, WizardPage.INFORMATION);
break;
default:
setErrorMessage(message);
this.setMessage(null);
break;
}
}
COM: <s> applies the status to the status line of a dialog page </s>
|
funcom_train/18430059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Paint getPaint(double value) {
double v = Math.max(value, this.lowerBound);
v = Math.min(v, this.upperBound);
int g = (int) ((v - this.lowerBound) / (this.upperBound
- this.lowerBound) * 255.0);
return new Color(g, g, g, this.alpha);
}
COM: <s> returns a paint for the specified value </s>
|
funcom_train/28750837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumofsets(Long newVal) {
if ((newVal != null && this.numofsets != null && (newVal.compareTo(this.numofsets) == 0)) ||
(newVal == null && this.numofsets == null && numofsets_is_initialized)) {
return;
}
this.numofsets = newVal;
numofsets_is_modified = true;
numofsets_is_initialized = true;
}
COM: <s> setter method for numofsets </s>
|
funcom_train/37236562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getJurisdictionsByHosptial(String hospital) {
try {
String sql = sqlStrings.getProperty("juri_getJurisByHospital");
Object[] params = new Object[]{hospital};
return jdbcTemplate.queryForList(sql, params, String.class);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
COM: <s> returns a jurisdiction where a particular hospital is located </s>
|
funcom_train/8337662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PersistedSPObject createPersistedObjectFromSPObject(SPObject spo) {
String parentUUID = null;
int index = 0;
if (spo.getParent() != null) {
parentUUID = spo.getParent().getUUID();
index = spo.getParent().getChildren(spo.getClass()).indexOf(spo);
}
return new PersistedSPObject(parentUUID, spo.getClass().getSimpleName(),
spo.getUUID(), index);
}
COM: <s> returns a new </s>
|
funcom_train/20876671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object configure(Element e, XMLContext context) throws XMLConfigurationException {
String urlParam = e.getAttribute("url");
String connsParam = e.getAttribute("maxConns");
String url = ServerConfig.get(urlParam);
int maxConns = Integer.parseInt(ServerConfig.get(connsParam));
try
{
this.url = new URL(url);
}
catch (Exception ex)
{
throw new XMLConfigurationException("Error configuring HTTPMessageDeliveryImpl!", ex);
}
this.numConns = maxConns;
setupPool();
return this;
}
COM: <s> convenience method for configuring by xml </s>
|
funcom_train/43132996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void statusTextChange(WebBrowserEvent browserEvent) {
String statusText = browserEvent.getData();
if (statusText != null) {
if (statusText.startsWith("command:")) {
//we have got a command, let us process it
String htmlId = statusText.substring(8);
selectedIndex = elementId.indexOf(htmlId);
}
//else ignore the status text
}
}
COM: <s> processes the commands coming from the web page set by javascript </s>
|
funcom_train/48704992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(BstEntry context) {
if (stack.size() < 2) {
throw new VMException("Not enough operands on stack for operation +");
}
Object o2 = stack.pop();
Object o1 = stack.pop();
if (!(o1 instanceof Integer && o2 instanceof Integer)) {
throw new VMException("Can only compare two integers with +");
}
stack.push(new Integer(((Integer) o1).intValue() + ((Integer) o2).intValue()));
}
COM: <s> pops the top two integer literals and pushes their sum </s>
|
funcom_train/21181149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isStoredObject(Expression receiver) {
//
// The receiver must be a variable declared in this
// class or a super class or surrounding class that is
// being accessed through a target of this, super, or null
//
if (receiver instanceof SimpleName) {
SimpleName name = (SimpleName)receiver;
IVariableBinding varBinding = variableBinding(name);
if (!varBinding.isField()) {
return false;
}
ITypeBinding type = varBinding.getDeclaringClass();
}
return false;
}
COM: <s> method is stored object </s>
|
funcom_train/26094251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean store() throws IOException {
if (neatIdMapFileName != null) {
FileWriter out = null;
try {
out = new FileWriter(neatIdMapFileName);
out.write(toXml());
out.flush();
return true;
} finally {
if (out != null)
out.close();
}
}
return false;
}
COM: <s> persist id factories and maps </s>
|
funcom_train/5724277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processAccessTypeChanged(ValueChangeEvent event) {
Object accessType = event.getNewValue();
courseOptionsInfo.setAccessType((AccessType) accessType);
setSessionBean(Constants.COURSE_OPTIONS_INFO, courseOptionsInfo);
if (!AccessType.PASSWORD.equals(accessType) && !AccessType.APPLICATION.equals(accessType)) {
courseOptionsInfo.setCollaboration(false);
courseOptionsInfo.setPapersubmission(false);
}
}
COM: <s> value change listener to switch password input text on and off </s>
|
funcom_train/6202564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDisplayModificationInfo(String displayModificationInfo) {
UIThreadsUtil.mustBeSwingThread();
parent.commitAndDeactivate();
this.displayModificationInfo = displayModificationInfo;
Preferences.setPreference(Preferences.DISPLAY_MODIFICATION_INFO, displayModificationInfo);
if (Core.getProject().isProjectLoaded()) {
parent.loadDocument();
parent.activateEntry();
}
}
COM: <s> sets the setting for display the modification information or not </s>
|
funcom_train/39273587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void create(Serializable obj) {
try {
if (LOG.isDebugEnabled()) {
LOG.debug("create: Using Hibernate to save this BO " + obj);
}
mSession.save(obj);
} catch (HibernateException ex) {
LOG.error("Error saving a BO", ex);
throw new TransactionException("Error saving a BO", ex);
}
}
COM: <s> create a new record in the applicaitons persistent store using a </s>
|
funcom_train/39379767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Set asSet(String value, String delim) {
Set set = new HashSet();
if (value == null) {
return set;
}
StringTokenizer tokenizer = new StringTokenizer(value, delim);
while (tokenizer.hasMoreTokens()) {
String id = tokenizer.nextToken();
set.add(id);
}
return set;
}
COM: <s> returns the specified string value as a set tokenizing the </s>
|
funcom_train/38306253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentPage(MMSPage currentPage) {
stopSound();
this.currentPage = currentPage;
for (int i = 0; i < doc.getPages().size(); i++) {
if (currentPage == (MMSPage) doc.getPages().get(i))
currentPageNr = i + 1;
}
setChanged();
notifyObservers();
// only play sound if it is enabled and no autoplay is active
if ((this.soundEnabled) && (player == null))
this.playSound();
}
COM: <s> sets the current page </s>
|
funcom_train/45692245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addArpeggiatorCenterNotePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Pattern_arpeggiatorCenterNote_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_arpeggiatorCenterNote_feature", "_UI_Pattern_type"),
EsxPackage.Literals.PATTERN__ARPEGGIATOR_CENTER_NOTE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the arpeggiator center note feature </s>
|
funcom_train/12621978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendToContact(StringBuffer contactBuffer, String tag, String value) {
value = (value == null) ? "" : value;
if (value.length() > 0) {
value = StringTools.escapeXml(value);
}
contactBuffer.append("<").append(tag).append(">").append(value);
contactBuffer.append("</").append(tag).append(">\n");
}
COM: <s> appends the contact information </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.