__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/6263699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doAdd() {
Job job = new Job();
JobEditDialog edit = new JobEditDialog( this,
resString( "dubman.add_job_title" ), true, //$NON-NLS-1$
job, settings );
job = edit.getJob();
if ( job != null ) {
jt.addJob( job );
templateChanged = true;
refreshList();
}
}
COM: <s> add a new job to the job list </s>
|
funcom_train/13318105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IDialogSettings getDialogSettings() {
AbstractUIPlugin plugin = EditorEnhancementsPlugin.getDefault();
IDialogSettings settings = plugin.getDialogSettings();
dialogSettings = settings.getSection(getClass().getName());
if (dialogSettings == null) {
dialogSettings = settings.addNewSection(getClass().getName());
}
return dialogSettings;
}
COM: <s> returns the dialog settings object used to share state </s>
|
funcom_train/40001490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void ensureCapacity() {
int height = view.getTopOffset() + view.getHeight();
if (scans == null || scans.length != height) {
scans = new Scan[height];
for (int i=0; i<height; i++) {
scans[i] = new Scan();
}
// set top and bottom so clearCurrentScan clears all
top = 0;
bottom = height - 1;
}
}
COM: <s> ensures this scan converter has the capacity to </s>
|
funcom_train/50502353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getEditorFactories(Class instanceClass) {
List compEditorFactories = new LinkedList();
synchronized(editorFactories) {
Iterator iter = editorFactories.iterator();
while(iter.hasNext()) {
IEditorFactory ed = (IEditorFactory) iter.next();
if(ed.accepts(instanceClass)) {
compEditorFactories.add(ed);
}
}
}
return compEditorFactories;
}
COM: <s> gets the editor factories that are interested in creating editors </s>
|
funcom_train/50464187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBLXElement(BLXElement blxElement) {
contextURL = blxElement.getContextURL();
//Set extension Info
extension = blxElement.getExtension();
String _id = blxElement.getID();
if((_id != null) && (_id.length()>0)) this.id = _id;
}
COM: <s> set the blxelement for the object that this helper is managing </s>
|
funcom_train/51584985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Field getCommandField() {
try {
final Field commandField =
CommandContributionItem.class.getDeclaredField(
COMMAND_FIELD);
notNull(commandField);
return commandField;
} catch (SecurityException e) {
throw new RuntimeException(e);
} catch (NoSuchFieldException e) {
throw new RuntimeException(e);
}
}
COM: <s> the command field of the command contribution item class </s>
|
funcom_train/42279903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMapped( String IDInput, String IDOutput ) {
if( this.outputMappings.containsKey(IDOutput) ) {
HashMap<String,MappingRecord> mappedIDs = this.outputMappings.get(IDOutput);
return mappedIDs.containsKey(IDInput);
}
else {
return false;
}
}
COM: <s> check if two fields are mapped </s>
|
funcom_train/47998165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupOtherActions() {
gamesList.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
selectionInGamesListChanged();
}
});
gamesList.addMouseListener(new DefaultMouseListener() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2
&& ((GameData) gamesList.getSelectedValue()).getGameLobbyState() == GameState.OPEN)
joinButtonClicked();
}
});
}
COM: <s> this method creates the eventhandlers for other components </s>
|
funcom_train/21303046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AliasType cloneAliasType(AliasType alias) {
if (alias == null) { return null; }
AliasType clone = new AliasType();
clone.setValue(alias.getValue());
clone.setType(alias.getType());
clone.setTypeAc(alias.getTypeAc());
return clone;
}
COM: <s> clones a alias type object </s>
|
funcom_train/13187536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj != null) {
if (obj instanceof Month) {
Month target = (Month) obj;
return (
(this.month == target.getMonth())
&& (this.year.equals(target.getYear()))
);
}
else {
return false;
}
}
else {
return false;
}
}
COM: <s> tests the equality of this month object to an arbitrary object </s>
|
funcom_train/37564572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRawBandwidth() {
long end= endTime;
if (end == -1)
end= new Date().getTime();
long totSecs= (end - startTime) / SECONDS_TO_MS_MULTIPLIER;
if (totSecs == 0)
totSecs= 1;
return (int) (rawBytesRecieved * 8 / 1024 / totSecs);
}
COM: <s> returns an approximation of the raw bandwidth used in kbits s </s>
|
funcom_train/13646923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashMap getCertificatesFromKeystore(KeyStore keystore) throws GeneralSecurityException{
HashMap certMap = new HashMap();
Enumeration enumeration = keystore.aliases();
while( enumeration.hasMoreElements() ){
String certAlias = (String)enumeration.nextElement();
certMap.put( certAlias, keystore.getCertificate(certAlias));
}
return(certMap);
}
COM: <s> returns a map that contains all certificates of the passed keystore </s>
|
funcom_train/3836801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPaneEditor() {
if (jContentPaneEditor == null) {
jContentPaneEditor = new JPanel();
jContentPaneEditor.setLayout(new BorderLayout());
jContentPaneEditor.add(getJJToolBarBar(),
java.awt.BorderLayout.NORTH);
jContentPaneEditor.add(getJSplitPane(),
java.awt.BorderLayout.CENTER);
}
return jContentPaneEditor;
}
COM: <s> this method initializes j content pane editor </s>
|
funcom_train/43654387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String formatMilliseconds(long ms) {
long days = ms / DAY_IN_MS;
long temp = new GregorianCalendar(2000, Calendar.JANUARY, 1)
.getTimeInMillis();
Date dummyDate = new Date(temp + ms);
DateFormat df = new SimpleDateFormat("HH:mm:ss");
String time = df.format(dummyDate);
String result = days > 0 ? days + "d " + time : time;
return result;
}
COM: <s> format a time in millisecond as days hh mm ss </s>
|
funcom_train/21733516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean loadActions() {
String actionsDir = Configurations.getInstance().getProperty(ACTIONS_DIR);
if (actionsDir == null || actionsDir.length() == 0) {
logger.error("Unable to find the actions directory");
return false;
}
actionCollection = actionsLoader.loadActions(actionsDir);
// Add the actions to the factory
actionFactory.fill(actionCollection);
return true;
}
COM: <s> load actions will load the actions specified in certain directories </s>
|
funcom_train/35691682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFastStep() {
if (_fastStep != null) {
return _fastStep.intValue();
}
ValueBinding vb = getValueBinding("fastStep");
Integer v =
vb != null ? (Integer) vb.getValue(getFacesContext()) : null;
return v != null ? v.intValue() : Integer.MIN_VALUE;
}
COM: <s> p return the value of the code fast step code property </s>
|
funcom_train/5459706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getComment() {
if (comment == null)
{
Node labelNode = ModelUtil.getPropertyValue(ontologyModel, optionUri, RDFS.comment);
if (labelNode != null) {
comment = labelNode.toString();
} else {
comment = optionUri.toString().substring(optionUri.toString().lastIndexOf('#') + 1);
}
}
return comment;
}
COM: <s> returns the comment for this configuration option </s>
|
funcom_train/12807159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream extractRevision(String field) throws IOException {
getSignatureNames();
field = getTranslatedFieldName(field);
if (!sigNames.containsKey(field))
return null;
int length = sigNames.get(field)[0];
RandomAccessFileOrArray raf = reader.getSafeFile();
raf.reOpen();
raf.seek(0);
return new RevisionStream(raf, length);
}
COM: <s> extracts a revision from the document </s>
|
funcom_train/10749203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testThread_Daemon() {
ThreadRunningAnotherThread t = new ThreadRunningAnotherThread();
t.setDaemon(true);
t.start();
t.stop = true;
try {
t.join();
} catch (InterruptedException e) {
fail(INTERRUPTED_MESSAGE);
}
assertTrue("the child thread of a daemon thread is non-daemon",
t.childIsDaemon);
}
COM: <s> verify that a thread created by a daemon thread is daemon </s>
|
funcom_train/14072333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TableItem newProviderTableItem(String providerName, int index) {
TableItem item = new TableItem(providersTable, index);
item.setText(0, String.valueOf(index + 1));
item.setText(1, providerName);
if (index == 0)
item.setText(2, Messages.ProvidersPreferencesPage_6);
return item;
}
COM: <s> creates a new table item with the given parameters </s>
|
funcom_train/47509505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(ParaConhecimento entity) {
EntityManagerHelper.log("saving ParaConhecimento instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved para conhecimento entity </s>
|
funcom_train/17678489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendRefDropConstraint(CharBuf s, JdbcConstraint c, boolean comments) {
// if (comments && isCommentSupported()) {
// s.append(comment("dropping unknown constraint " + c.name));
// s.append('\n');
// }
s.append("ALTER TABLE ");
s.append(c.src.name);
s.append(" DROP CONSTRAINT ");
s.append(c.name);
}
COM: <s> append an drop constraint statement for c </s>
|
funcom_train/51161629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TupleDomain (int arity, CSPDomain domain){
CSPDomain domains[] = new CSPDomain[arity];
this.arity = arity;
name = "";
Elements = new Vector();
for(int i=0; i<arity; i++)
domains[i] = domain;
setDomain(domains);
}
COM: <s> creates a new tuple domain object with arity code arity code and cspdomains </s>
|
funcom_train/26391696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int shutdown() {
setVisible(false);
if (myShellTextArea != null) {
remove(myShellTextArea);
myShellTextArea.shutdown();
myShellTextArea = null;
} /* End if*/
dispose();
if (null == mySoftWoehr)/* ! Should be an interface, not Desktop per se.*/ {
System.exit(0);
}
return 0;
}
COM: <s> shutdown the object and its dependents </s>
|
funcom_train/46601167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildImagePanel() {
//Create the panel
imagePanel = new JPanel();
//Create the label that will display the image using its Icon property
hangManImage = new JLabel();
//The the image size to 100 X 100
hangManImage.setPreferredSize(new Dimension(100,100));
//Put the image label on the panel
imagePanel.add(hangManImage);
}
COM: <s> this method builds the panel that displays the hang man image </s>
|
funcom_train/20778813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPosition(int position){
stopLearning();
// if we limit the arm position here, we cannot block balls outside our own view.... don't do this.
// arm position is limited by servoLimitLeft and servoLimitRight which user sets by hand using GUI
state=ServoArmState.active;
setPositionDirect(position);
}
COM: <s> sets the arm position in pixel space </s>
|
funcom_train/24049928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkValid(LinearRing g) {
checkInvalidCoordinates(g.getCoordinates());
if (validErr != null)
return;
checkClosedRing(g);
if (validErr != null)
return;
GeometryGraph graph = new GeometryGraph(0, g);
checkTooFewPoints(graph);
if (validErr != null)
return;
LineIntersector li = new RobustLineIntersector();
graph.computeSelfNodes(li, true);
checkNoSelfIntersectingRings(graph);
}
COM: <s> checks validity of a linear ring </s>
|
funcom_train/35572334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Item setupMenuItem(String menuName, PadronWidget content) {
final PadronWidget contentToShow = content;
Item item = new Item();
item.setText(menuName);
final BaseItemListenerAdapter listener = new BaseItemListenerAdapter() {
@Override
public void onClick(BaseItem item, EventObject e) {
displayContentWidget(contentToShow);
}
};
item.addListener(listener);
return item;
}
COM: <s> add an option to the main menu </s>
|
funcom_train/5867381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CategoryDataset CategoryModelToCategoryDataset(CategoryModel model) {
final DefaultCategoryDataset dataset = new DefaultCategoryDataset();
for (final Iterator it = model.getKeys().iterator(); it.hasNext();) {
final List key = (List) it.next();
Comparable series = (Comparable) key.get(0);
Comparable category = (Comparable) key.get(1);
Number value = (Number) model.getValue(series, category);
dataset.setValue(value, series, category);
}
return dataset;
}
COM: <s> transfer a category model into jfree chart category dataset </s>
|
funcom_train/43245124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPatientName() {
System.out.println("setPatientName");
String patientName = "";
PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object();
instance.setPatientName(patientName);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set patient name method of class org </s>
|
funcom_train/450563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tag createTag () {
//Choose a random tag name.
Tag tag = new Tag();
int tagNumber = (int) Math.floor(Math.random() * 3);
//Choose random parameters for the tag.
if (tagNumber == 0) {tag.setValue("Greeble");}
else if (tagNumber == 1) {tag.setValue("Snyt");}
else if (tagNumber == 2) {tag.setValue("Zort");}
return tag;
}
COM: <s> create a tag </s>
|
funcom_train/31467447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(AddExpression node) {
if (node.hasProperty(NodeProperties.VALUE)) {
// The expression is constant
return node.getProperty(NodeProperties.VALUE);
} else {
return InterpreterUtilities.add
(NodeProperties.getType(node),
node.getLeftExpression().acceptVisitor(this),
node.getRightExpression().acceptVisitor(this));
}
}
COM: <s> visits a add expression </s>
|
funcom_train/50940376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDataFlavorSupported(DataFlavor flavor) {
if ( flavor.getMimeType().equals("text/plain")
|| flavor.getMimeType().equals("text/rtf")
// || flavor.getMimeType().equals("text/html")
|| flavor.equals(DataFlavor.stringFlavor)
) {
return true;
}
return false;
}
COM: <s> returns whether or not the specified data flavor is supported for </s>
|
funcom_train/32220537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String marshall() {
// return document == null ? null : document.asXML();
StringWriter buf = new StringWriter();
try {
OutputFormat outformat = OutputFormat.createPrettyPrint();
outformat.setEncoding("UTF-8");
XMLWriter writer = new XMLWriter(buf, outformat);
// HTMLWriter writer = new HTMLWriter(buf, outformat);
writer.write(this.document);
writer.flush();
} catch (IOException e) {
}
return buf.toString();
}
COM: <s> marshall the document and return the xml content </s>
|
funcom_train/46454325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void arithmeticLevel3() throws ParserException {
boolean negate;
if(ISBOOLEAN) {
throw new ParserException(INVALID_OPERAND);
}
negate = getIdentifier();
if(ISBOOLEAN) {
throw new ParserException(INVALID_OPERAND);
}
if(character=='^') {
arithmeticLevel3();
}
addCode('^');
if(negate) {
addCode('_');
}
}
COM: <s> scans arithmetic level 3 highest </s>
|
funcom_train/812709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void layoutDiagram(SchemaDiagramPart diagram) {
partToNodesMap = new HashMap();
graph = new DirectedGraph();
addNodes(diagram);
if (graph.nodes.size() > 0) {
addEdges(diagram);
new NodeJoiningDirectedGraphLayout().visit(graph);
applyResults(diagram);
}
}
COM: <s> public method for reading graph nodes </s>
|
funcom_train/17915031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveEntities_1() {
try {
XmlUtil.removeEntities(null, null);
fail("no IllegalArgumentException on null reader and null writer");
} catch(IllegalArgumentException excep) {
// OK
} catch (Exception excep) {
fail("Unhandled exception: " + excep.getMessage());
}
}
COM: <s> test method void remove entities reader writer </s>
|
funcom_train/32070596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDocumentAttachmentGroup(DocumentAttachmentGroup documentAttachmentGroup) {
boolean addOk = getDocumentAttachmentGroups().add(documentAttachmentGroup);
if (addOk) {
documentAttachmentGroup.setLabel((Label)this);
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed document attachment group to the label collection </s>
|
funcom_train/50327123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void noteWriteComplete(int block) {
// check to see if we're doing a write of an entire SE
int section = block % (ENTRYSIZE/4);
if (keepWriting && (section < (ENTRYSIZE/4-1))) {
sendWrite(block+1);
} else {
keepWriting = false;
}
}
COM: <s> keep a write going if needed </s>
|
funcom_train/16823249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Rect getNewRect(Canvas canvas) {
Rect rect = canvas.getClipBounds();
Rect newRect = new Rect();
newRect.top=rect.top+MARGIN1;
newRect.bottom=rect.bottom-MARGIN1;
newRect.left=rect.left+MARGIN1;
newRect.right=rect.right-MARGIN1;
return newRect;
}
COM: <s> gets the new rect </s>
|
funcom_train/37853313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void optimize() {
IndexWriter writer = null;
try {
writer = index.getWriter(true);
writer.forceMerge(1, true);
writer.commit();
} catch (IOException e) {
LOG.warn("An exception was caught while optimizing the lucene index: " + e.getMessage(), e);
} finally {
index.releaseWriter(writer);
}
}
COM: <s> optimize the lucene index by merging all segments into a single one </s>
|
funcom_train/46322422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoordinateSystem getRelativeCoordinateSystem() {
if (relativeCoordinateSystemValidToFrame < getFrameCount()) {
relativeCoordinateSystemValidToFrame = Long.MAX_VALUE;
relativeCoordinateSystem =
new CoordinateSystem(getPosition().get(), getRotation().get());
}
return relativeCoordinateSystem;
}
COM: <s> get the coordinate system which maps between this objects and its </s>
|
funcom_train/17935385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getWindowsjMenuItem() {
if (windowsjMenuItem == null) {
windowsjMenuItem = new JRadioButtonMenuItem();
windowsjMenuItem.setText("Windows");
windowsjMenuItem
.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent e) {
setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
});
}
return windowsjMenuItem;
}
COM: <s> this method initializes windowsj menu item </s>
|
funcom_train/3086924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMenuMode(String subMenuIconURI, int subMenuIconAlignment, int width, int height, boolean subMenuIconBordered, boolean menuItemTDMode) {
buttonRender.setMenuMode(subMenuIconURI, subMenuIconAlignment, width, height, subMenuIconBordered, menuItemTDMode);
}
COM: <s> this is provided for the convienience of menu items derived from button </s>
|
funcom_train/18628226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getDocument() throws DataException {
try {
if (wrapped instanceof URL)
return reader.read((URL) wrapped);
if (wrapped instanceof File)
return reader.read((File) wrapped);
} catch (MalformedURLException e) {
throw new DataException("Invalid URL " + location);
} catch (DocumentException e) {
throw new DataException("Invalid document at " + location);
}
throw new DataException(
"DataContainer can wrap only File or URL. This should never happen!");
}
COM: <s> returns the document that this data container points to </s>
|
funcom_train/13390427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testSetThresholdValues() {
/* States:
* Any
* Argument combinations:
* thresholdValues: valid object, null
*/
ThresholdEvent event = new ThresholdEvent(new Object());
ThresholdValues thv = new ThresholdValues();
event.setThresholdValues(thv);
Assert.assertSame(thv, event.getThresholdValues());
event.setThresholdValues(null);
Assert.assertSame(null, event.getThresholdValues());
}
COM: <s> tests the code set threshold values threshold values code method </s>
|
funcom_train/49262628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void save(final Preference preference) {
try {
Element root = new Element("preference"); //$NON-NLS-1$
Document document = new Document(root);
setXmlData(root, preference);
saveXmlData(preference.getClass(), document);
} catch (Exception e) {
System.err.println(e.getClass().toString() + e.getLocalizedMessage());
}
}
COM: <s> save a single preference object </s>
|
funcom_train/38215471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init(){
this.Version="HTTP/1.1";
this.Code=200;
this.ContentType="text/html";
this.Connection="keep-alive";
this.cookie=null;
this.AdditionalHeaders=new Hashtable();
this.Cookies=new Vector();
//more to come i guess ;)
}
COM: <s> post contructor initialization </s>
|
funcom_train/27721591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String hideField(TypeEntry tEntry, String value) {
// Log.out("hideField value=" + value + " isPasswordHidden=" + isPasswordHidden + " tEntry.getHidable() " +tEntry.getHidable());
if ((tEntry != null) && (tEntry.getHidable()) && isPasswordHidden) {
return ("********");
}
return (value);
}
COM: <s> change the layout of the application hide the important fields </s>
|
funcom_train/18592897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Collection getComponentTesterMethods(ComponentTester tester) {
ArrayList list =
new ArrayList(Arrays.asList(tester.getPropertyMethods()));
list.addAll(Arrays.asList(tester.getAssertMethods()));
list.addAll(Arrays.asList(tester.getComponentAssertMethods()));
return list;
}
COM: <s> add in assert xxx methods to the list already generated </s>
|
funcom_train/43479491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initUsers() {
String[] users = new File(constants.get(ZephyrOpen.root)).list();
for (int i = 0; i < users.length; i++)
if (new File(constants.get(ZephyrOpen.root) + ZephyrOpen.fs + users[i]).isDirectory())
if (!users[i].equals(ZephyrOpen.zephyropen))
addUser(users[i]);
if (userList.getItemCount() == 0) {
addUser("brad");
}
/** re-draw list */
userList.repaint();
}
COM: <s> get list of users for the directory structure </s>
|
funcom_train/43245335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNOKOneZip() {
System.out.println("getNOKOneZip");
EmergencyContactObject instance = new EmergencyContactObject();
String expResult = "";
String result = instance.getNOKOneZip();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get nokone zip method of class org </s>
|
funcom_train/22026937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyToSelectedURLs() {
if(currentPanel instanceof DataURLProcessor) {
String ce = ((DataURLProcessor)currentPanel).getURL().getConstraintExpression();
for(int i=0;i<oldSelectedValues.length;i++) {
if(oldSelectedValues[i] instanceof DodsURL)
((DodsURL)oldSelectedValues[i]).setConstraintExpression(ce);
}
}
}
COM: <s> applies the constraint expression for the current url to all of </s>
|
funcom_train/12550851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeFinalSnap() throws IOException,JDOMException {
//Write the snapshot
Driver.show.writeSnap(Driver.TITLE,
MakeURI.doc_uri(lineNumber, f),
MakeURI.make_uri(lineNumber,
PseudoCodeDisplay.GREEN, f),
Driver.runTimeStack, f.jvmLegend,
Driver.heap);
}
COM: <s> write the last snapshot of the visualization </s>
|
funcom_train/32097454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean testFile(String filePath)
{ /* testFile */
boolean flag= false;
try
{
File fd= new File(filePath);
flag= (fd.isFile() && fd.exists() && fd.canRead());
}
catch(Exception e)
{
flag= false;
}
return(flag);
} /* testFile */
COM: <s> test file test if file exists and is readable </s>
|
funcom_train/38878721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// set hardware keys to control multimedia audio level
setVolumeControlStream(AudioManager.STREAM_MUSIC);
// initialize preferences
Preferences.setContext(this.getApplicationContext());
// assign actions to layout
setLayout();
}
COM: <s> activity starting procedures </s>
|
funcom_train/20061021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PostprocLibrary pp_help(Pointer<Byte > pp_help) {
try {
{
BridJ.getNativeLibrary("postproc").getSymbolPointer("pp_help").as(org.bridj.util.DefaultParameterizedType.paramType(org.bridj.Pointer.class, java.lang.Byte.class)).set(pp_help);
return this;
}
}catch (Throwable $ex$) {
throw new RuntimeException($ex$);
}
}
COM: <s> a simple help text br </s>
|
funcom_train/13259694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getPlotYMin() {
double min = Double.MAX_VALUE;
for (int i = 0; i < valuesNumber; i++) {
if (!notValidBoundPointsStatus[i]) {
//check lower bound
if (lowerBounds[i] < min) {
min = lowerBounds[i];
}
} else {
//check the value
if (values[i] < min) {
min = values[i];
}
}
}
return min;
}
COM: <s> gets the minimum represented value </s>
|
funcom_train/112161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public List getLocales(List iViews) {
if(iViews == null) return null;
Vector locales = new Vector();
Iterator viewIterator = iViews.iterator();
while(viewIterator.hasNext()) {
View view = (View) viewIterator.next();
if(!locales.contains(view.getLocale())) locales.add(view.getLocale());
}
if(locales.size() == 0) locales = null;
return locales;
}
COM: <s> returns a list of locales extracted from a list of views </s>
|
funcom_train/26401922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String showUser(User user) {
String description = "";
if (user.getName() != null) {
description = user.getName();
if (user.getEmail() != null) description += ": <" + user.getEmail() + ">";
} else if (user.getEmail() != null) {
description = user.getEmail();
}
return(description);
}
COM: <s> show the user in the form </s>
|
funcom_train/36192986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInsertAfterIndexExamples() {
try {
assertEquals(abc.insertAfterIndex(1,cd), abdc);
assertEquals(abc.insertAfterIndex(-1,cd), dabc);
} catch (JMLSequenceException e) {
fail("indexing here should not raise a JMLSequenceException");
}
}
COM: <s> test the examples from the insert after index method </s>
|
funcom_train/50849646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tickAction() {
if (iTickDelay > 0) {
iTickDelay--;
return;
}
// Normal move.
selectMovement();
tickMove();
// If I am at a waypoint, select next one.
if (iX == aiTargetX[iTarget] && iY == aiTargetY[iTarget]) {
iTarget++;
}
}
COM: <s> move and die away if i am out of the sight zone </s>
|
funcom_train/47867330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getButtons() {
if (buttons == null) {
buttons = new JPanel();
buttons.setLayout(new FlowLayout());
buttons.add(getButtonOk(), null);
buttons.add(getButtonCancel(), null);
buttons.add(getButtonApply(), null);
buttons.add(getButtonHelp(), null);
}
return buttons;
}
COM: <s> this method initializes buttons </s>
|
funcom_train/18744129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RefreshableMenuItem getEnableMenuItem() {
if (this.enableMenuItem == null) {
this.enableMenuItem = new RefreshableMenuItem() {
@Override
protected void refresh(ResourceKind resource) {
setAction(getActions().getEnableAction(resource));
}
};
}
return this.enableMenuItem;
}
COM: <s> returns the menu item in the edit menu that specifies deletion of </s>
|
funcom_train/10633191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor_ByIDOrderFlag() {
String ID = "attribute two";
boolean flag = false;
BasicAttribute attribute = new BasicAttribute(ID, flag);
assertEquals(ID, attribute.getID());
assertEquals(flag, attribute.isOrdered());
assertEquals(0, attribute.size());
ID = "attribute three";
flag = true;
attribute = new BasicAttribute(ID, flag);
assertEquals(ID, attribute.getID());
assertEquals(flag, attribute.isOrdered());
assertEquals(0, attribute.size());
}
COM: <s> test basic attribute constructor 1 use a specified id 2 use a specified </s>
|
funcom_train/1678248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setKey(DatabaseEntry entry, int val, int len) {
TupleOutput out = new TupleOutput();
out.writeInt(val);
for (int i = 0; i < len - 4; i += 1) {
out.writeByte(0);
}
TupleBase.outputToEntry(out, entry);
}
COM: <s> outputs an integer followed by pad bytes </s>
|
funcom_train/20604228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printNodeNames(Node node, String strIndent) throws Exception {
NodeIterator nodeIterator = null;
logger.info(strIndent + node.getName());
nodeIterator = node.getNodes();
strIndent += " ";
while (nodeIterator.hasNext()) {
Node nodeDescendant = nodeIterator.nextNode();
this.printNodeNames(nodeDescendant, strIndent);
}
}
COM: <s> name print of given node </s>
|
funcom_train/13286501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("Schritt 1", null, getJPanel(), null);
jTabbedPane.addTab("Schritt 2", null, getJPanel1(), null);
jTabbedPane.addTab("Schritt 3", null, getJPanel51(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/17904866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rectangle getCloseIconRectangle(Rectangle tabRect) {
int y = tabRect.y + ((tabRect.height - TabControlIcon.ICON_HEIGHT) / 2);
int x = tabRect.x + tabRect.width - TabControlIcon.ICON_WIDTH - 6;
return new Rectangle(x, y, TabControlIcon.ICON_WIDTH, TabControlIcon.ICON_HEIGHT);
}
COM: <s> calculates the close icon rectangle for the specified </s>
|
funcom_train/20078135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUpdateTrackCommentQuery(String trackId) {
return "for $track in //track[@id='" + trackId + "'] " +
" let $newComment := fn:number($track/comment-count) + 1" +
" return " +
" update replace $track/comment-count with " +
" element { \"comment-count\" }{ $newComment }";
}
COM: <s> update track comment command </s>
|
funcom_train/45502000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRecording( RecordingMode recording, Dimension resolution ) {
this.recording = recording;
if( recording == RecordingMode.Recording ) {
showIntro = 0;
oldX = this.getSize().width;
oldY = this.getSize().height;
movieWidth = resolution.width;
movieHeight = resolution.height;
introCount = 0;
screenshotCounter = 0;
} else if( recording == RecordingMode.NotRecording )
setSize( oldX, oldY );
}
COM: <s> p enables or disables the movie capture mode and sets the movie resolution </s>
|
funcom_train/13816046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void discard() {
// Setting the model again causes all fields to reread field values from model
Iterator fieldIter = modelFields.values().iterator();
while ( fieldIter.hasNext() ) {
FieldController fieldCtrl = (FieldController) fieldIter.next();
fieldCtrl.setModel( photos, false );
}
rawFactories.clear();
colorMappingFactories.clear();
}
COM: <s> discards modifications done after last save </s>
|
funcom_train/13482073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bfsAddToQueue(Vertex u, Vertex w, Graph g, ArrayList<Vertex> queue){
u.setVisited(true); // always
queue.add(u); // always
u.setScore(w.getScore() * g.probabilityInfects(w,u)); // modifiable
}
COM: <s> adds the vertex u to the queue </s>
|
funcom_train/19322620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
if (o == null) { return -1; }
MLetArgument tmp = (MLetArgument) o;
CompareToBuilder builder = new CompareToBuilder();
builder.append(getType(), tmp.getType());
return builder.toComparison();
}
COM: <s> compare according to type </s>
|
funcom_train/28505899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLowContainerRow(){
int low = -1;
int lowc = -1;
for(int i = 0; i < ContainerRow.length; i++){
if(low < 0 || ContainerRow[i]<low){
low = ContainerRow[i];
lowc = i;
}
}
return lowc;
}
COM: <s> returns the row with the least containers </s>
|
funcom_train/777452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLocalName() throws JademxException {
JadeAgent jadeAgent = platformMBean.getAgent( AGENT_LOCAL_NAME_PINGER2);
String actualLN = jadeAgent.getLocalName();
assertEquals("expected agent local name \""+AGENT_LOCAL_NAME_PINGER2+
"\" but got \""+actualLN+"\"",
AGENT_LOCAL_NAME_PINGER2,actualLN);
}
COM: <s> test getting agents local name </s>
|
funcom_train/26085830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidLineChart() {
return this.chartName != null && this.dataSet != null && this.chartType == ChartModel.CHART_BAR
&& this.categoryColumnIndex >= 0 && this.columns != null && this.columns.length > 0
&& this.rows != null && this.rows.length > 0 && this.isLineChart;
}
COM: <s> valid line charts have the same definitions as bar charts as theyre </s>
|
funcom_train/32723880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushToFile(String fileName) throws CodeGenException,IOException,FileNotFoundException {
PrintWriter writer = CodeGenUtil.createFile(outputDirectory,fileName,sourceType);
CodeGenUtil.generateCodeGenHeader(writer,generatorName,"",sourceType);
writer.println(buildSource());
writer.close();
}
COM: <s> writes data to file generate through a call to code build source code </s>
|
funcom_train/4269000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchRecipe(long rowId) throws SQLException {
Cursor mCursor = mDb.query(true, DATABASE_TABLE_RECIPE, new String[] {
KEY_ROWID, KEY_TITLE, KEY_DESCRIPTION, KEY_AUTHOR, KEY_SOURCE,
KEY_CATEGORY }, KEY_ROWID + "= ?", new String[] { String
.valueOf(rowId) }, null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> return a cursor positioned at the recipe that matches the given row id </s>
|
funcom_train/3792732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect(PeerIdentity peerI) throws PeerConnectionException {
RemoteCommandReceiver rer = (RemoteCommandReceiver) _peersToremoteCommandReceivers.remove(peerI);
_remoteCommandReceiversToPeers.remove(rer);
try {
rer.closeConnection(_myPeerIdentity);
} catch (RemoteException e) {
throw new PeerConnectionException("Could not close connection to peer " + e.getMessage(), peerI);
}
}
COM: <s> disconnect peer and remove it from local data strucuture </s>
|
funcom_train/27825185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerEvaluator(String evaluatorName,Evaluator evaluator,MagicSetRewriting magicSetRewriting) {
if (evaluator==null) {
m_queryEvaluators.remove(evaluatorName);
m_magicSetRewritings.remove(evaluatorName);
}
else {
m_queryEvaluators.put(evaluatorName,evaluator);
m_magicSetRewritings.put(evaluatorName,magicSetRewriting);
}
}
COM: <s> registers an evaluator for given name </s>
|
funcom_train/18457849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetWindowsJWindow() {
SplashScreen splashScreen = new SplashScreen();
Window[] windows = WindowMonitor.getWindows();
Vector results = new Vector(Arrays.asList(windows));
assertTrue("Windows are not the same", results.contains(splashScreen));
m_window = splashScreen; // register this to be destroyed at the end
}
COM: <s> validate that we can capture the jwindow </s>
|
funcom_train/27778086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSomeReadsAndWrites() throws Exception {
System.out.println("testSomeReadsAndWrites");
String testMessage = MailUtil.createDummyEMail();
byte[] testContent = testMessage.getBytes("ISO-8859-1");
MessageLocation location = testStore.store(testContent);
// now let's get it back
byte[] content = testStore.retrieve(location);
assertTrue(Arrays.equals(testContent, content));
}
COM: <s> test of retrieve method of class org </s>
|
funcom_train/44875469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void preloadImages() {
// the first time this image is loaded it seems to fail
try {
JavaUI.getSharedImages().getImage( org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_DEFAULT );
UIPlugin.getSharedImages().getImage( ISharedImages.UNRES16X16_ICON );
}
catch (Exception e) {
// ignore
}
}
COM: <s> internal method for preloading images some images seem </s>
|
funcom_train/10267941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Query createQuery(String queryString) {
Query query = null;
if (_persistOn) {
try {
query = _factory.openSession().createQuery(queryString);
} catch (HibernateException he) {
_log.error("Error creating query: " + queryString, he);
}
}
return query;
}
COM: <s> creates a query object based on the sql string passed </s>
|
funcom_train/44950896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPortableChars() {
StringBuffer all = new StringBuffer("-_.0123456789");
for (char c = 'a'; c <= 'z'; c += 1) {
all.append(c);
all.append(Character.toUpperCase(c));
}
portableChars = all.toString().toCharArray();
Arrays.sort(portableChars);
}
COM: <s> ensures that portable chars contains only chars conforming to the posix recommendation </s>
|
funcom_train/43245581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSecondMostRecentCareLocation() {
System.out.println("setSecondMostRecentCareLocation");
String secondMostRecentCareLocation = "";
PatientDataDG2Object instance = new PatientDataDG2Object();
instance.setSecondMostRecentCareLocation(secondMostRecentCareLocation);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set second most recent care location method of class org </s>
|
funcom_train/35541956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMultilineStatement() {
parseAndCheck(
" 01 A" + LS
+ " PIC" + LS
+ " X" + LS
+ " VALUE" + LS
+ " SPACES" + LS
+ " ."
,
"(DATA_ITEM (LEVEL 01) (NAME A) (PICTURE X) (VALUE SPACES))");
}
COM: <s> test a statement that extends on multiple lines </s>
|
funcom_train/43770333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveDownElement(final int eid) {
// set current label
label.add(localOrder);
// set current path
if(coder.isEmpty()) {
coder.separatorSlash();
coder.identifer(eid);
} else {
coder.separatorSlash();
coder.identifer(eid);
}
// set for the sibling node.
this.localOrder = 1;
}
COM: <s> the operation method to move down the position in the tree </s>
|
funcom_train/32611512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisualisationEnvironmentHomeRotation() {
Transform3D origionalTransform = new Transform3D();
rootTransformGroup.getTransform(origionalTransform);
centerScene(appUniverse, sceneRoot);
mouseContolsTransformGroup.getTransform(origionalTransform);
Matrix3d origionalMatrix = new Matrix3d();
origionalTransform.getRotationScale(origionalMatrix);
Matrix3d newMatrix = new Matrix3d();
newMatrix.rotY(0.0);
origionalMatrix.set(newMatrix);
origionalTransform.setRotation(origionalMatrix);
mouseContolsTransformGroup.setTransform(origionalTransform);
}
COM: <s> rotates and translates the scene back to a safe point </s>
|
funcom_train/48872164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void gameOverMessage(Graphics g) {
String msg = "Game Over. Your Score: " + this.score;
int x = (width - this.metrics.stringWidth(msg)) / 2;
int y = (height - this.metrics.getHeight()) / 2;
g.setColor(Color.red);
g.setFont(this.font);
g.drawString(msg, x, y);
}
COM: <s> center the game over message in the panel </s>
|
funcom_train/20394607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Locale getLocale() {
Locale locale = null;
locale = getContext().getLocale();
String lang = locale.getLanguage();
if (Arrays.binarySearch(SUPPORTED_LANGUAGES, lang) >= 0) {
return locale;
}
locale = Locale.getDefault();
lang = locale.getLanguage();
if (Arrays.binarySearch(SUPPORTED_LANGUAGES, lang) >= 0) {
return locale;
}
return Locale.ENGLISH;
}
COM: <s> returns the tt locale tt that should be used in this behavior </s>
|
funcom_train/15540127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(int indent) {
for (int i = 0; i < size(); i++) {
for (int j = 0; j < indent; j++) System.out.print(" ");
String s = (String)elementAt(i);
System.out.println("reasemb: " + s);
}
}
COM: <s> print the reassembly list </s>
|
funcom_train/46694818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullExecute() {
System.out.println("execute");
Graph g = QueryTestGraphs.emptyGraph;
NullActorQuery instance = new NullActorQuery();
instance.buildQuery(false);
Collection<Actor> result = instance.execute(g, null, null);
assertEquals(0, result.size());
}
COM: <s> test of execute method of class null actor query </s>
|
funcom_train/28345274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addNode( final AcceleratorNode newNode ) {
final int insertIndex = indexToAddNode( newNode );
try {
addNodeAt( insertIndex, newNode );
nodeTable.put( newNode.getId(), newNode );
if ( newNode instanceof AcceleratorSeq ) {
_sequences.add( (AcceleratorSeq)newNode );
}
return true;
}
catch( IndexOutOfBoundsException exception ) {
return false;
}
}
COM: <s> method to move a node from one sequence to this sequence </s>
|
funcom_train/42035606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(GameObject drawableObject) {
if(drawableObject == null) {
Debug.warning("Layer.add", "Tried adding an invalid DrawableObject");
return;
}
if(gameObjects.getCount() == gameObjects.getCapacity()) {
Debug.warning("Layer.add", "Tried adding to a Layer which is full, maximum=" + maximumDrawableObjects);
return;
}
gameObjects.add(drawableObject);
drawableObject.onAdd(this);
}
COM: <s> adds a drawable object to this layer </s>
|
funcom_train/31818257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStoryCardActualEffort(long id, float actualEffort) {
AsyncCallback callback = new AsyncCallback() {
public void onSuccess(Object result) {
listener.updatedStoryCardActualEffort((StoryCardWeb)result);
}
public void onFailure(Throwable caught) {
caught.printStackTrace();
}
};
aps.updateStoryCardActualEffort(id, actualEffort, callback);
}
COM: <s> updates the actual effort of a storycard </s>
|
funcom_train/40409373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAllForCampaign() throws Exception {
AdExtensionOverrideSelector selector = new AdExtensionOverrideSelector();
selector.setCampaignIds(new long[] {campaignId});
AdExtensionOverridePage page = service.get(selector);
assertNotNull(page);
assertNotNull(page.getEntries());
assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >= 1);
}
COM: <s> test getting all ad extension override for a campaign </s>
|
funcom_train/50878388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showErrorPage(Request inRequest, Response inResponse, String inError){
showHeaderPage(inRequest, inResponse, "Error in "+getName());
PrintWriter out = inResponse.getWriter();
out.println(inError);
showTailerPage(inRequest, inResponse);
}
COM: <s> show an error message </s>
|
funcom_train/38725518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetDatabase() throws SQLException, ClassNotFoundException, IOException {
Logger.getLogger(getClass().getName()).info("Resetting database...");
ShapeType currentMode = getDatabaseMode();
deleteSQLSchema(); //delete schema & records
createSQLSchema(currentMode); //recreate schema
AlgorithmManager.getInstance().checkForAlgorithms();
}
COM: <s> resets the currently connected databased </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.