__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/22156341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTextListener() {
removeTextListener();
text.addListener(SWT.FocusIn, textListener);
text.addListener(SWT.FocusOut, textListener);
text.addListener(SWT.KeyDown, textListener);
text.addListener(SWT.MouseDown, textListener);
text.addListener(SWT.MouseWheel, textListener);
text.addListener(SWT.MouseUp, textListener);
text.addListener(SWT.Traverse, textListener);
text.addListener(SWT.Verify, textListener);
}
COM: <s> adds the text listener for the appropriate swt events to handle incrementing fields </s>
|
funcom_train/4403380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AgentInspector createAgentInspector(Simulator simulator, int x, int y) {
ArrayList agents = simulator.getAgentList();
SimpleAgent a = ((SimpleAgent) agents.get(0));
if (a instanceof Agent) {
AgentInspector ai = new AgentInspector((Agent) a, !backgroundMode, simulator);
desktop.add(ai);
ai.show();
ai.setLocation(x, y);
return ai;
} else
return null;
}
COM: <s> creates agent inspector window </s>
|
funcom_train/7418488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild(BaseElement child) {
if(child instanceof Lane) {
this.getChildLaneSet().getLanes().add((Lane) child);
((Lane) child).setLaneSet(this.getChildLaneSet());
} else if (!(child instanceof Edge)) {
this.getFlowElementRef().add((FlowElement) child);
}
}
COM: <s> adds the child to the lanes flow elements if possible </s>
|
funcom_train/16608136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String buildStudentTestClasspath() {
StringBuffer cp = new StringBuffer();
cp.append(getProjectSubmission().getBuildOutputDirectory()
.getAbsolutePath());
cp.append(File.pathSeparator);
cp.append(getProjectSubmission().getTestSetup().getAbsolutePath());
JavaBuilder.appendBuildServerToClasspath(cp);
JavaBuilder.appendJUnitToClassPath(cp);
if (getProjectSubmission().isPerformCodeCoverage())
JavaBuilder.appendCloverToClassPath(cp);
return cp.toString();
}
COM: <s> build the classpath to be used for unofficial student test cases </s>
|
funcom_train/7862817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertNewDocument()
{
// creiamo un oggetto di tipo TextEditorPane e lo aggiungiamo anche ad un arrayList
// per sfruttare la tecnica del riferimento in memoria
TextEditorPane document = new TextEditorPane();
document.setAlreadySaved(false);
document.setPaneName("New Document" + getNewDocumentAppend() + ".txt");
document.setMouseListener(new PopupListener());
documents.add(document);
JScrollPane scrollPane = new JScrollPane(document);
tabbedPane.add(document.getPaneName() , scrollPane);
numNewDocument++;
}
COM: <s> method to insert a new empty document </s>
|
funcom_train/37578121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(int keycode) {
int action = getGameAction(keycode);
if(action == Canvas.UP) {
panNorth();
} else if(action == Canvas.DOWN) {
panSouth();
} else if(action == Canvas.LEFT) {
panWest();
} else if(action == Canvas.RIGHT) {
panEast();
}
}
COM: <s> detects when a game key is pressed on the micro device and pans </s>
|
funcom_train/16629416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNeighboursOfConceptByID(Long ID, String separator){
String neighbours = "";
ArrayList<Long> neighbourList = getNeighbourIDsOfConcept(ID);
for (int i = 0; i < neighbourList.size(); i++){
neighbours += getConceptByID(neighbourList.get(i)) + separator;
}
return neighbours;
}
COM: <s> get names of the neighbours of concept given by id </s>
|
funcom_train/25525514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String createInsertScriptsForTag(Tag tag) {
String insertScript ="INSERT INTO TAG VALUES(" + tag.getId() + "," + tag.getUri() + ", '"
+ tag.getTagName() + "', " + tag.getWeight() + ", "
+ tag.getTagFrequency() + ", " + tag.getTagAuthor() + ");";
return insertScript;
}
COM: <s> creates scripts for tag table according to table columns </s>
|
funcom_train/28992752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFileInfoCompleted(PortalMediator pm, Map m) {
DefaultContentAttachmentProcessor dcap =
new DefaultContentAttachmentProcessor(pm.getPortal());
addAttribute(CPK_CONTENT_PATH,
dcap.getContentPath((String) m.get(CPK_CONTENT_ID),
(String) m.get(CAK_VERSION)));
addAttribute(CPK_CONTENT_ID, (String) m.get(CPK_CONTENT_ID));
}
COM: <s> adds the content path and content id to new file commands </s>
|
funcom_train/27825180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getBindingGoodness(Literal literal,boolean[] boundVariables) {
int goodness;
if (literal.isPositive()) {
goodness=0;
for (int i=0;i<boundVariables.length;i++)
if (boundVariables[i])
goodness++;
}
else
goodness=-10000;
return goodness;
}
COM: <s> compute the goodness of the bindings in a literal </s>
|
funcom_train/26413925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encodeWithTags(boolean includeType) {
// FIXME: Properly XML-encode the value
if (includeType)
return "<AttributeValue DataType=\"" + type.toString() + "\">" +
encode() + "</AttributeValue>";
else
return "<AttributeValue>" + encode() + "</AttributeValue>";
}
COM: <s> encodes the value and includes the attribute value xml tags so that </s>
|
funcom_train/49046155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonMenuButtOrigCol() {
//if (buttOrigCol == null) {
buttOrigCol = new JRadioButtonMenuItem();
buttOrigCol.setText("Calculated clusters");
buttOrigCol.setToolTipText("the calculated clusters ares used as output colors");
buttOrigCol.addActionListener(this);
buttOrigCol.setActionCommand("parameter");
//}
return buttOrigCol;
}
COM: <s> this method initializes the option orig col </s>
|
funcom_train/31023372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer("ForwardConfig[");
sb.append("name=");
sb.append(this.name);
sb.append(",path=");
sb.append(this.path);
sb.append(",redirect=");
sb.append(this.redirect);
sb.append("]");
return (sb.toString());
}
COM: <s> return a string representation of this object </s>
|
funcom_train/40622728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeaderCount(int headerCount) {
HeaderProperty prop = properties.getColumnProperty(HeaderProperty.TYPE,
false);
if (prop == null) {
prop = new HeaderProperty();
setColumnProperty(HeaderProperty.TYPE, prop);
}
prop.setHeaderCount(headerCount);
}
COM: <s> set the number of headers above the column </s>
|
funcom_train/35837475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reallocateIndexes() {
int rowCount = model.getRowCount();
this.sorted = false;
// Set up a new array of indexes with the right number of elements
// for the new data model.
indexes = new int[rowCount];
// Initialise with the identity mapping.
for (int row = 0; row < rowCount; row++) {
indexes[row] = row;
}
}
COM: <s> unsort the table and clear the index </s>
|
funcom_train/9073915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setValues(View view, Cursor cursor) {
TextView nameView = (TextView) view
.findViewById(R.id.list_item_name);
String name = cursor.getString(cursor
.getColumnIndex(PeopleColumns.NAME));
if (nameView != null && name != null) {
nameView.setText(name);
}
TextView numberView = (TextView) view
.findViewById(R.id.list_item_number);
String number = cursor.getString(cursor
.getColumnIndex(PhonesColumns.NUMBER));
if (numberView != null && number != null) {
numberView.setText(number);
}
}
COM: <s> simple method to set the values of the two textviews </s>
|
funcom_train/141037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseArguments(String[] args) {
if(args.length == 1)
{
checkArguments("",args[0]);
}else if(args.length%2 == 0)
{
for(int i=0; i<args.length; i += 2)
checkArguments(args[i],args[i+1]);
}
else
outputErrorMessage("Invalid number of arguments");
}
COM: <s> parses command line argument and adds valid arguments to the argument dictionary </s>
|
funcom_train/23949368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createRoomEditWindow( JFrame frame ){
RoomView editorWindow = new RoomView();
JScrollPane scroll = new JScrollPane( editorWindow,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );
frame.add( scroll, BorderLayout.CENTER );
}
COM: <s> creates and addds the room editor window </s>
|
funcom_train/38996034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initComponents() {
setLayout(new BorderLayout());
setDefaultCloseOperation(EXIT_ON_CLOSE);
cards = new JPanel(new CardLayout());
connectPanel = new ConnectPanel(this);
cards.add(connectPanel, "connect");
tabs = new JTabbedPane();
cards.add(tabs, "messages");
serverMessages = new MessagePanel();
tabs.add("<html><b>Server", serverMessages);
add(cards, BorderLayout.CENTER);
setCard("connect");
setSize(400, 300);
setVisible(true);
}
COM: <s> initializes the components </s>
|
funcom_train/43106736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void list() {
View.show(ListCategoriesView.view(
models,
// responder to delete the category
new D<CategoryModel>(){
public void call(CategoryModel cat) {
// remove the category from the main set
models.remove(cat);
// removes category from all sales that use it
for (GarageSaleModel sale: d.garage_sale.getModels())
sale.categories.remove(cat);
}
}
));
}
COM: <s> list shows the list view for the categories </s>
|
funcom_train/43589921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancelUpdateButton() {
if (cancelUpdateButton == null) {
cancelUpdateButton = new JButton();
cancelUpdateButton.setText("Update Later");
cancelUpdateButton.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent e) {
ViewHandler.getInstance().hideUpdateWindow();
}
});
}
return cancelUpdateButton;
}
COM: <s> this method initializes cancel update button </s>
|
funcom_train/21995601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteForSources(Connection conn, Collection tune_ids) throws DatabaseException {
if (tune_ids.size() == 0)
return; //trivial case, nothing to do
StringBuffer buf = new StringBuffer(256);
buf.append("src_id IN (");
buf.append( Strings.join(tune_ids.iterator(), ",") );
buf.append(')');
delete(conn, buf.toString());
}
COM: <s> clear the source list table of references to the specified tunes </s>
|
funcom_train/40884193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains (Vector3 v) {
if (min.x > v.x) return false;
if (max.x < v.x) return false;
if (min.y > v.y) return false;
if (max.y < v.y) return false;
if (min.z > v.z) return false;
if (max.z < v.z) return false;
return true;
}
COM: <s> returns wheter the given vector is contained in this bounding box </s>
|
funcom_train/48706140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExternalFileType getExternalFileTypeByName(String name) {
for (Iterator<ExternalFileType> iterator = externalFileTypes.iterator(); iterator.hasNext();) {
ExternalFileType type = iterator.next();
if (type.getName().equals(name))
return type;
}
// Return an instance that signifies an unknown file type:
return new UnknownExternalFileType(name);
}
COM: <s> look up the external file type registered with this name if any </s>
|
funcom_train/38808676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCM__String_getPublicID() throws JHuPeDOMException {
String publicID = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN";
DocType theDocType = jhupeDomFactory.newDocType("anElement", publicID,
"");
assertEquals(publicID, theDocType.getPublicID());
}
COM: <s> test that get public id matches the value from the constructor </s>
|
funcom_train/29699082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getOriginalWalkMP() {
int base = super.getOriginalWalkMP();
switch(mode) {
case MODE_AIRMECH :
case MODE_CONVERT_AIRMECH_TO_AIRCRAFT :
base = (int)Math.ceil((double)base / 3.0);
break;
case MODE_CONVERT_AIRMECH_TO_MECH:
base = (int)Math.ceil((double)base / 6.0);
break;
}
return base;
}
COM: <s> returns the original walking mp for that mode or that conversion </s>
|
funcom_train/20778729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(State newState) {
// if current state was sleeping and new state is active then reset the arm tracker to try to unstick
// it from noise spikes
if(getState()==State.SLEEPING && newState==State.ACTIVE){
servoArm.getArmTracker().resetFilter(); //
}
this.state.set(newState);
}
COM: <s> sets the state </s>
|
funcom_train/10299042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration getIDs(URL url) {
String tmp=null;
URL tmpURL=null;
Vector ids = new Vector();
for (Enumeration e = resource.getKeys() ; e.hasMoreElements() ;) {
String key = (String) e.nextElement();
try {
tmp = resource.getString(key);
tmpURL = new URL(base, tmp);
if (url.sameFile(tmpURL) == true) {
ids.addElement(key);
}
} catch (Exception ex) {
}
}
return new FlatEnumeration(ids.elements(), helpset);
}
COM: <s> determines the ids related to this url </s>
|
funcom_train/37448637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer("LabelValueBean[label=");
sb.append(this.label);
sb.append(", value=");
sb.append(this.value);
sb.append(", description=");
sb.append(this.description);
sb.append("]");
return (sb.toString());
}
COM: <s> return a string representation of this object </s>
|
funcom_train/29547276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fsExists(String uri) {
String[] folderUris=getFolderUris();
if(folderUris!=null && uri!=null) {
for (int i = 0; i < folderUris.length; i++) {
if(uri.equals(folderUris[i])) {
return true;
}
}
}
return false;
}
COM: <s> check whether folder exists </s>
|
funcom_train/18755539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addActionListener(ActionListener l) {
getComponent();
if (_component instanceof JTextField)
((JTextField)_component).addActionListener(l);
if (_component instanceof JComboBox)
((JComboBox)_component).addActionListener(l);
if (_component instanceof AbstractButton)
((AbstractButton)_component).addActionListener(l);
}
COM: <s> adds the action listener to the jcomponent if that component can </s>
|
funcom_train/46737327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCustomControllerRef(DisplayModel customControllerRef) {
if (Converter.isDifferent(this.customControllerRef, customControllerRef)) {
DisplayModel oldcustomControllerRef= new DisplayModel(this);
oldcustomControllerRef.copyAllFrom(this.customControllerRef);
this.customControllerRef.copyAllFrom(customControllerRef);
setModified("customControllerRef");
firePropertyChange(String.valueOf(FORMTYPES_CUSTOMCONTROLLERREFID), oldcustomControllerRef, customControllerRef);
}
}
COM: <s> custom controller for this form </s>
|
funcom_train/20350556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processVmDestroy(SimEvent ev, boolean ack) {
Vm vm = (Vm) ev.getData();
getVmAllocationPolicy().deallocateHostForVm(vm);
if (ack) {
int[] data = new int[3];
data[0] = getId();
data[1] = vm.getId();
data[2] = CloudSimTags.TRUE;
sendNow(vm.getUserId(), CloudSimTags.VM_DESTROY_ACK, data);
}
getVmList().remove(vm);
}
COM: <s> process the event for an user broker who wants to destroy a vm </s>
|
funcom_train/14148180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllStateWaitingTimes() {
ArrayList result = new ArrayList();
for (Iterator iterator = scenarioReports.values().iterator(); iterator.hasNext();) {
ScenarioReport sr = (ScenarioReport) iterator.next();
result.addAll(
sr.getStateWaitingTimes());
}
return result;
}
COM: <s> returns a list with a value statistic result for </s>
|
funcom_train/8343272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printTable(final boolean preview) {
PrintUtility print;
Component root;
String windowTitle = null;
root = SwingUtilities.getAncestorOfClass(JInternalFrame.class, this);
if (root != null && root instanceof JInternalFrame) {
windowTitle = ((JInternalFrame) root).getTitle();
}
print = new PrintUtility(this, windowTitle, preview);
try {
print.print();
} catch (PrinterException pe) {
}
}
COM: <s> called to print the table </s>
|
funcom_train/15607599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenomeVersionLoader getGenomeVersion() throws Exception {
if (genomeVersion == null) {
Gff3GenomeVersion xmlGenomeVersion = new Gff3GenomeVersion();
xmlGenomeVersion.setGenomeVersionSpace(getGenomeVersionSpace());
genomeVersion = xmlGenomeVersion;
} // Need to create it.
return genomeVersion;
} // End method: getGenomeVersion */
COM: <s> returns the genome version facade </s>
|
funcom_train/1165881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Status reply(String sid,String cid,String comment) throws WeiboException {
return new Status(http.post(getBaseURL() + "statuses/reply.json",
new PostParameter[]{new PostParameter("id", sid),
new PostParameter("cid", cid),
new PostParameter("comment", comment)}, true));
}
COM: <s> return a status of reply </s>
|
funcom_train/50332307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addButtonActionPerformed() {
javax.swing.JOptionPane.showMessageDialog(this,
rb.getString("NotSupported1")+"\n"+rb.getString("NotSupported2"),
rb.getString("NotSupportedTitle"),
javax.swing.JOptionPane.INFORMATION_MESSAGE);
resetNotes();
return;
}
COM: <s> method to handle add button </s>
|
funcom_train/1057255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage imageZoomOut(BufferedImage srcBufferImage, int w, int h) {
width = srcBufferImage.getWidth();
height = srcBufferImage.getHeight();
scaleWidth = w;
if (DetermineResultSize(w, h) == 1) {
return srcBufferImage;
}
CalContrib();
BufferedImage pbOut = HorizontalFiltering(srcBufferImage, w);
BufferedImage pbFinalOut = VerticalFiltering(pbOut, h);
return pbFinalOut;
}
COM: <s> start use lanczos filter to replace the original algorithm for image </s>
|
funcom_train/5347361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStringQueryKeyConstructor() {
QueryKey key = QueryKey.getQueryKey(GUID.makeGuid(), true);
QueryRequest qr =
QueryRequest.createQueryKeyQuery("test", key);
runStandardChecks(qr, false, UrnType.ANY_TYPE_SET,
Collections.EMPTY_SET, key);
assertEquals("unexpected query", "test", qr.getQuery());
assertNull("unexpected xml query", qr.getRichQuery());
}
COM: <s> tests constructor that only takes a string and a query key </s>
|
funcom_train/12299538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getMenuNavigate() {
if (menuNavigate == null) {
menuNavigate = new JMenu();
menuNavigate.setMnemonic(KeyEvent.VK_N);
menuNavigate.setName("MenuNavigate"); //$NON-NLS-1$
menuNavigate.setText(Messages.getString("MainWindow.navigate")); //$NON-NLS-1$
menuNavigate.add(getMenuItemFirst());
menuNavigate.add(getMenuItemPrior());
menuNavigate.add(getMenuItemNext());
menuNavigate.add(getMenuItemLast());
}
return menuNavigate;
}
COM: <s> this method initializes menu navigate </s>
|
funcom_train/38785955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Algebraic add (Algebraic x) throws JasymcaException{
if( x.scalarq() )
x = x.promote( this );
if( x instanceof Vektor &&
((Vektor)x).length() == a.length ) {
Algebraic b[] = new Algebraic[a.length];
for(int i=0; i<a.length; i++)
b[i] = a[i].add( ((Vektor)x).a[i] );
return new Vektor(b);
}
throw new JasymcaException("Wrong Vektor dimension.");
}
COM: <s> add two algebraic objects </s>
|
funcom_train/24351005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void storeIt(FieldEditor editor, String name) {
String temp = editor.getPreferenceName();
editor.setPreferenceName(name);
editor.store();
if (store.getDefaultString(name).equals(store.getString(name)))
store.setToDefault(name);
editor.setPreferenceName(temp);
editor.store();
}
COM: <s> utility routine to store a specified preference for a specified editor </s>
|
funcom_train/51011386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readNeighbour() throws Exception {
try {
Connection con = connect();
try {
con.setReadOnly(true);
nextQuestion = qdb.getNextQuestion(con, qid);
prevQuestion = qdb.getPreviousQuestion(con, qid);
neighbourRead = true;
} finally {
con.close();
}
} catch (Exception e) {
Log.error(e);
neighbourRead = false;
throw e;
}
}
COM: <s> reads neighbouring questions of the current one </s>
|
funcom_train/38300369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean tableExists(String name) {
Statement stmt = null;
try {
stmt = getConnectionWrapper().getConnection().createStatement();
stmt.execute("SELECT COUNT(*) FROM "+name);
return true;
} catch (SQLException e) {
// table doesn't exist
return false;
} finally {
if (stmt != null) {
try{
stmt.close();
}
catch(SQLException see) {
see.printStackTrace();
}
}
}
}
COM: <s> check whether a database table already exists </s>
|
funcom_train/19035686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MemberID validateLogin(String username, String password) {
MemberID memberID = null;
Account account = this.getAccount(username);
if(account != null) {
if(account.getPassword() != null &&
account.getPassword().equals(password)) {
return account.getMemberID();
}
}
return memberID;
}
COM: <s> checks to make sure that the specified account exist </s>
|
funcom_train/44485075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateKeywords() {
String s = keywordsTF.getText().trim();
if(s.length() == 0) {
settings.setKeywords(new String[0]);
return;
}
/*
* Keywords stored and compared in lower case form!
* Replace whitespace and convert into comma-separated list.
*/
s = s.toLowerCase();
s = s.replaceAll("\\s+", ",");
s = s.replaceAll(",+", ",");
String[] sArr = s.split(",");
settings.setKeywords(sArr);
}
COM: <s> updates the user entered keywords to search for to the main class </s>
|
funcom_train/50155435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String hiddenState( String groupTop, PageContext page ) {
if ( page.getAttribute( "SetMetadataVocabInputState" + groupTop ) != null ) {
return "";
}
page.setAttribute( "SetMetadataVocabInputState" + groupTop, new Boolean( true ) );
return "\n<input type='hidden' name='SetMetadataVocabInputState' value='" + groupTop + "'>";
}
COM: <s> each method above that renders vocabs as html form inputs ends up inserting </s>
|
funcom_train/48855540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(String workDir) {
this.currentMove = new CurrentMove(this);
this.documentCache = new DocumentCache(workDir, this);
// register message handlers
Ivanhoe.registerGameMsgHandler(MessageType.JOURNAL_DATA, this);
Ivanhoe.registerGameMsgHandler(MessageType.MOVE, this);
SimpleLogger.logInfo("Discourse Field initialized using root dir ["
+ workDir + "]");
}
COM: <s> initialize the discourse field for the given player </s>
|
funcom_train/13965246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WOComponent returnAction() {
masterObject().editingContext().saveChanges();
WOComponent result = (nextPageDelegate() != null) ? nextPageDelegate().nextPage(this) : super.nextPage();
if (result != null) {
return result;
}
result = (WOComponent)D2W.factory().editPageForEntityNamed(masterObject().entityName(), session());
((EditPageInterface)result).setObject(masterObject());
return result;
}
COM: <s> perform the return action </s>
|
funcom_train/12828170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String key) {
String value = null;
if (searchNextFirst) {
if (next != null) {
value = next.getProperty(key);
}
if (value == null) {
value = getValue(key);
}
} else {
value = getValue(key);
if (value == null && next != null) {
value = next.getProperty(key);
}
}
if (debug) {
log("*** PL@" + id(this) + " getProperty(" + key + ") => " + value);
}
return value;
}
COM: <s> looks up code key code in the wrapped object </s>
|
funcom_train/570913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireChangeEvent() {
if (!_fireingChangeEvent) {
_fireingChangeEvent = true;
ChangeEvent event = new ChangeEvent(this);
for (int i = 0; i < _changeListener.size(); i++) {
((ChangeListener) _changeListener.get(i)).stateChanged(event);
}
_fireingChangeEvent = false;
}
}
COM: <s> fires the change event </s>
|
funcom_train/13935974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorldEntity getCreature(String id) {
WorldEntity c=creatures.get(id);
if (c==null) {
CreatureReader cr=new CreatureReader();
try {
c=cr.extractCreature(id,cr.getCreatureDocument(id));
if (c!=null) {
creatures.put(id,c);
c.justLoaded();
}
} catch (IOException e) {
System.out.println("Unable to open creatures document");
} catch(CorruptedElementException ce) {
return null;
}
}
return c;
}
COM: <s> you should call use down on the creature when you finish using it </s>
|
funcom_train/45918722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startTubeletPolling(TubeletLoader tl) {
try {
logger.info("Starting Tubelet Loader polling...");
tl.startPolling();
logger.info("Tubelet Loader started.");
} catch (LoaderException e) {
throw new RuntimeException("Error while starting Tubelet Loader.");
}
}
COM: <s> starts the tubelet loader polling </s>
|
funcom_train/10642350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResizable(final boolean b) {
boolean oldValue = isResizable();
resizable = b;
LookAndFeel.markPropertyNotInstallable(this,
StringConstants.INTERNAL_FRAME_RESIZABLE_PROPERTY);
firePropertyChange(StringConstants.INTERNAL_FRAME_RESIZABLE_PROPERTY, oldValue, b);
}
COM: <s> sets the code resizable code property </s>
|
funcom_train/37833114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void finish(final boolean reset, final Player player) {
if (player != null) {
final IRPZone playerZone = player.getZone();
if (playerZone.equals(zone)) {
player.teleport(entranceZone, door.getX(), door.getY() + 1,
Direction.DOWN, player);
}
}
if (reset) {
removeAllTokens();
this.player = null;
moveCount = 0;
if (timer != null) {
SingletonRepository.getTurnNotifier().dontNotify(timer);
}
door.open();
}
}
COM: <s> finishes the quest and teleports the player out </s>
|
funcom_train/40621765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow(int row) {
if (onRowRemoved(row)) {
// Fire listeners
if (listeners != null) {
listeners.fireRowRemoved(row);
}
// Decrement the row count
int numRows = getRowCount();
if (numRows != UNKNOWN_ROW_COUNT) {
setRowCount(numRows - 1);
}
}
}
COM: <s> remove a row and decrement the row count by one </s>
|
funcom_train/29982564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLocaleDisplayName() {
String localeDisplayName = "";
Locale currentLocale = new Locale(this.getLocale());
localeDisplayName = currentLocale.getDisplayName(currentLocale);
LOG.debug("getLocaleDisplayName(" + this.locale + ") => " + localeDisplayName);
return localeDisplayName;
}
COM: <s> get the display name of the users locale as a string </s>
|
funcom_train/39964361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fundSelected(Fund fund) {
System.out.println("Fund selected: " + fund);
int width = fundPanel.getWidth();
int height = fundPanel.getHeight();
fundPanel.setImage(chartService.createChart(fund, null, width, height));
}
COM: <s> handles a selection of a fund </s>
|
funcom_train/20106648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void valueChanged() {
setPresentsDefaultValue(false);
final boolean oldState = isValid;
refreshValidState();
if (isValid != oldState) {
fireStateChanged(FieldEditor.IS_VALID, oldState, isValid);
}
final String newValue = textField.getText();
if (!newValue.equals(oldValue)) {
fireValueChanged(FieldEditor.VALUE, oldValue, newValue);
oldValue = newValue;
}
}
COM: <s> informs this field editors listener if it has one about a change </s>
|
funcom_train/11103960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int indexOfFormMarker() {
int i = 0;
if (JSFRuntimeTracker.getJsfRuntime() == JSFRuntimeTracker.MYFACES_1_1) {
i = 1;
} else if (JSFRuntimeTracker.getJsfRuntime() == JSFRuntimeTracker.RI_1_2) {
i = 2;
}
return i;
}
COM: <s> p returns an index into the code form makkers code array </s>
|
funcom_train/44871719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTicksWidthPanel() {
if (ticksWidthPanel == null) {
ticksWidthLabel = new JLabel();
ticksWidthLabel.setText("Width ");
ticksWidthPanel = new JPanel();
ticksWidthPanel.setLayout(new BoxLayout(getTicksWidthPanel(),
BoxLayout.X_AXIS));
ticksWidthPanel.add(ticksWidthLabel, null);
ticksWidthPanel.add(getTicksLineWidthComboBox(), null);
}
return ticksWidthPanel;
}
COM: <s> this method initializes ticks width panel </s>
|
funcom_train/5855652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte[] b, int off, int len) throws IOException {
if (off < 0 || len < 0 || off + len > b.length) {
throw new IndexOutOfBoundsException();
}
int result = fd.getBroker().read(pos, b, off, len);
if (result > 0) {
pos += result;
}
return result;
}
COM: <s> read bytes into the given array </s>
|
funcom_train/8080155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Instances makeHeader() {
FastVector fv = new FastVector();
fv.addElement(new Attribute("Margin"));
fv.addElement(new Attribute("Current"));
fv.addElement(new Attribute("Cumulative"));
return new Instances("MarginCurve", fv, 100);
}
COM: <s> creates an instances object with the attributes we will be calculating </s>
|
funcom_train/4404054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeWithContainer(PopulationContainer __targetPopulationContainer) {
if (this == __targetPopulationContainer) {
Display.error("" + this.getClass().getName() + "::mergeWithContainer - cannot self-merge");
return;
}
for (int i = 0; i != __targetPopulationContainer.getPopulationSize(); i++)
this.registerIndividual((Individual) __targetPopulationContainer.getIndividualList().get(i));
__targetPopulationContainer.reset();
}
COM: <s> add all individual in target container to the calling containers list of </s>
|
funcom_train/3405562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parse() throws MessagingException {
if (parsed)
return;
initStream();
SharedInputStream sin = null;
if (in instanceof SharedInputStream) {
sin = (SharedInputStream)in;
}
String bnd = "--" + boundary;
byte[] bndbytes = ASCIIUtility.getBytes(bnd);
try {
parse(in, bndbytes, sin);
} catch (IOException ioex) {
throw new MessagingException("IO Error", ioex);
} catch (Exception ex) {
throw new MessagingException("Error", ex);
}
parsed = true;
}
COM: <s> parse the input stream from our data source constructing the </s>
|
funcom_train/595948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAnonymous() {
MapFactory factory = new MapFactory() {
public Map newMap() { return new HashMap(); }
};
Map map = factory.newMap();
assertNotNull(map);
assertTrue(map instanceof HashMap);
assertTrue(factory.newMap() instanceof HashMap);
Map map1 = factory.newMap();
Map map2 = factory.newMap();
assertNotSame(map1, map2);
}
COM: <s> p tests whether an anonymous map factory works </s>
|
funcom_train/928424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopApplicationManager() {
if (myLogger.isDebugEnabled()) {
myLogger
.debug("stopApplicationManager() - shutting down ApplicationManager");
}
//databaseManager.stopAllDatabaseServer();
webserverManager.stopAllWebserver();
//TODO: Shutdown all registered server and handle exceptions
started = false;
}
COM: <s> performs stop actions on all managers </s>
|
funcom_train/21125521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store(Context context) throws TimestampException {
logger.debug("DummyMsg received.");
EventManager em = context.getEventManager();
// register as last received update
em.setLastRecvUpdate(this);
logger.debug("Received DummyMsg (" + this.getSequenceNumber() + ") from " + this.getOriginatingSite().toString() );
em.getInTransactions().addEvent(this);
}
COM: <s> store dummy message together with transactions </s>
|
funcom_train/9876810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float findMaxDistance() {
float max = Float.MIN_VALUE;
for (int i=0; i<treeData.node_order.length-1; i++) {
max = Math.max(max, treeData.height[treeData.node_order[i]]);
}
return max;
}
COM: <s> returns min height of the tree nodes </s>
|
funcom_train/25073960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializiseMenuEdit() {
menuEditItemDelete.addActionListener(ToolbarActions.getDeleteAction());
menuEditItemCopyCycle.addActionListener(ToolbarActions
.getCopyCycleAction());
menuEditItemStartAutoParam.addActionListener(this);
menuEdit.add(menuEditItemDelete);
menuEdit.add(menuEditItemCopyCycle);
menuEdit.add(menuEditItemStartAutoParam);
add(menuEdit);
}
COM: <s> initializes the menu card edit </s>
|
funcom_train/25597757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGlyphs (List<Image> glyphs) {
List<Widget> children = new ArrayList<Widget> (getChildren ());
for (Widget widget : children)
removeChild (widget);
if (glyphs != null)
for (Image glyph : glyphs) {
ImageWidget imageWidget = new ImageWidget (getScene ());
imageWidget.setImage (glyph);
addChild (imageWidget);
}
}
COM: <s> sets glyphs as a list of images </s>
|
funcom_train/32636316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpirationTime(long expirationTime) {
if (expirationTime > 0) {
setExpirationDelta(expirationTime);
Date now = new Date();
expirationDate = new Date(now.getTime() + (expirationTime * 1000));
}
else {
SysLogger.println("WARNING: WorkUnit.setExpirationTime called with expiration time less than zero.");
SysLogger.println("WARNING: Using WorkUnit.DEFAULT_EXPIRATION_TIME (" + DEFAULT_EXPIRATION_TIME + " seconds).");
setExpirationDelta(DEFAULT_EXPIRATION_TIME);
}
}
COM: <s> sets the expiration time and then calculates and sets the expiration date </s>
|
funcom_train/18880970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JCheckBox getJCheckBoxLinkToBoatBearing() {
if (jCheckBoxLinkToBoatBearing == null) {
jCheckBoxLinkToBoatBearing = new JCheckBox();
jCheckBoxLinkToBoatBearing.setBounds(new Rectangle(388, 56, 143, 18));
jCheckBoxLinkToBoatBearing.setText("link to boat Bearing");
jCheckBoxLinkToBoatBearing.setSelected(simToolBox.linkGPSToBoatSurface);
}
return jCheckBoxLinkToBoatBearing;
}
COM: <s> this method initializes j check box link to boat bearing </s>
|
funcom_train/18861192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleAdd() {
PluginDialog dialog = new PluginDialog(getSection().getShell());
if (dialog.open() == PluginDialog.OK) {
PluginType element = dialog.getPlugin();
Command command = AddCommand.create(getEditingDomain(),
getStrutsConfig(), StrutsConfigPackage.eINSTANCE
.getStrutsConfigType_PlugIns(), element);
if (command.canExecute()) {
getEditingDomain().getCommandStack().execute(command);
}
}
}
COM: <s> adds a new plug in element to the struts config element </s>
|
funcom_train/43403109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Denotator removeFactor(int index) {
if (index < this.indexMap.size()) {
Denotator removed = this.getFactors().remove(index);
this.indexMap.remove(removed);
this.indexUpdateNecessary = true;
return removed;
} else throw new IndexOutOfBoundsException(index+" > "+(this.indexMap.size()-1));
}
COM: <s> removes the factor at code index code </s>
|
funcom_train/2845414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFileFormat(AnnotatedFileFormat fileFormat) {
if (this.fileFormat != null) {
if (fileFormat.getSourceFileFormat() != this.fileFormat.getSourceFileFormat())
setTextSaved(false);
}
setSaved(false);
this.fileFormat = fileFormat;
}
COM: <s> assigns this file the specified file format </s>
|
funcom_train/10929078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNamespaces() throws XMLStreamException {
writer.setPrefix(PREFIX_ATOM, Constants.NAMESPACE_ATOM);
writer.setPrefix(PREFIX_CMIS, Constants.NAMESPACE_CMIS);
writer.setPrefix(PREFIX_RESTATOM, Constants.NAMESPACE_RESTATOM);
writer.setPrefix(PREFIX_APP, Constants.NAMESPACE_APP);
writer.setPrefix(PREFIX_XSI, Constants.NAMESPACE_XSI);
}
COM: <s> sets the namespaces for the document </s>
|
funcom_train/21405099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void markFileUsages(TaskDescription task) throws DataException {
for (String file : task.getInput()){
this.markFileUsage(file, task, Occurrences.Purpose.INPUT);
}
for (String file: task.getOutput()){
this.markFileUsage(file, task, Occurrences.Purpose.OUTPUT);
}
}
COM: <s> marks all the given data sources of the current task to the </s>
|
funcom_train/49045543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelRegression() {
if (jPanelRegression== null) {
jPanelRegression = new JPanel();
jPanelRegression.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
jPanelRegression.add(getJLabelRegression());
jPanelRegression.add(getJPanelRegStart());
jPanelRegression.add(getJPanelRegEnd());
}
return jPanelRegression;
}
COM: <s> this method initializes j jpanel regression </s>
|
funcom_train/3423045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeReaders() {
// close all readers
for (int i = fOwnReaders.size()-1; i >= 0; i--) {
try {
((Reader)fOwnReaders.elementAt(i)).close();
} catch (IOException e) {
// ignore
}
}
// and clear the list
fOwnReaders.removeAllElements();
}
COM: <s> close all opened input streams and readers opened by this parser </s>
|
funcom_train/27869848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupImageButton(Composite toolSection) {
Composite tmp = new Composite(toolSection, SWT.NONE);
tmp.setLayout(new BorderLayout());
tmp.setLayoutData(BorderLayout.EAST);
Button mySpiderButton = new Button(tmp, SWT.NONE);
mySpiderButton.setText("Spider");
ImageLoader aLoader = new ImageLoader();
myData = aLoader.load("resource\\spider.gif");
mySpiderButton.setImage(new Image(myDisplay, myData[0]));
}
COM: <s> method setup image button </s>
|
funcom_train/32734243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Long findLong(String sql) {
assureDatabaseConnection();
try {
return i_stmtExecuter.getSingleRowColAsLong(sql);
} catch (SQLException ex) {
throw new DatabaseException(ex, sql + " failed.");
} finally {
if (!i_inTransactionState) {
i_jrfConnection.closeOrReleaseResources();
}
}
}
COM: <s> execute sql that returns a long </s>
|
funcom_train/41964456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int updatePoint(Point point) {
open();
ContentValues updateValues = new ContentValues();
updateValues.put(KEY_POINTS_LAT, point.getLatitude());
updateValues.put(KEY_POINTS_LON, point.getLongitude());
return mDb.update(DATABASE_POINTS, updateValues, KEY_ROWID + "="
+ point.getId(), null);
}
COM: <s> update the point </s>
|
funcom_train/29617962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getJUnusedSynonymsList() {
if (jUnusedSynonymsList == null) {
jUnusedSynonymsList = new JList();
jUnusedSynonymsList.setFont(MgisLabel.m_font);
UnusedSynonymListSelectionListener listener = new UnusedSynonymListSelectionListener(jUnusedSynonymsList);
jUnusedSynonymsList.getSelectionModel().addListSelectionListener(listener);
jUnusedSynonymsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
return jUnusedSynonymsList;
}
COM: <s> this method initializes j unused synonyms list </s>
|
funcom_train/12307804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void allocate(long size) throws IOException, ServerException {
Command cmd = new Command("ALLO", String.valueOf(size));
Reply reply = null;
try {
reply = controlChannel.execute(cmd);
} catch (UnexpectedReplyCodeException urce) {
throw ServerException.embedUnexpectedReplyCodeException(urce);
} catch (FTPReplyParseException rpe) {
throw ServerException.embedFTPReplyParseException(rpe);
}
}
COM: <s> reserve sufficient storage to accommodate the new file to be </s>
|
funcom_train/11652239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumn(int row, int col) throws IndexOutOfBoundsException {
String colData;
colData = fileData.get(row).get(col);
log.debug(fileName + "(" + row + "," + col + "): " + colData);
return colData;
}
COM: <s> get the string for the column from the current row </s>
|
funcom_train/13304543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExpressionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NegotiationRule_expression_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NegotiationRule_expression_feature", "_UI_NegotiationRule_type"),
NegotiationPackage.Literals.NEGOTIATION_RULE__EXPRESSION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the expression feature </s>
|
funcom_train/15409465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int executeUpdate() throws SQLException {
// check to see if the execution has been overridden
// only works in non-batch mode
if (callableSql.executeOverride(cstmt)) {
return -1;
// // been overridden so just return the rowCount
// rowCount = callableSql.getRowCount();
// return rowCount;
}
rowCount = cstmt.executeUpdate();
// only read in non-batch mode
readOutParams();
return rowCount;
}
COM: <s> execute the statement in normal non batch mode </s>
|
funcom_train/28155938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearPDFFiles() {
File outDir = new File(new File(BASEDIR),OUTDIR);
if (outDir.exists()) {
String filelist = "";
File auditpdf = new File(outDir, AUDITLOG_PDF);
File recountpdf = new File(outDir, RECOUNT_PDF);
// Always delete because confirmation has been given before
auditpdf.delete();
recountpdf.delete();
}
}
COM: <s> clear the pdf files </s>
|
funcom_train/12551640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resizeColForLabel(int c) {
double curSize = deltaArray[0][c].width;
double newSize = colLabels[c].length() * CHAR_SIZE;
if(newSize > curSize) {
for(int r = 0; r < rows; ++r) {
deltaArray[r][c].width = newSize;
}
}
}
COM: <s> resizes the column widths to fit the label of the column </s>
|
funcom_train/10299425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NavigatorView getNavigatorView(String name) {
debug("getNavigatorView("+name+")");
for (int i=0; i<views.size(); i++) {
NavigatorView view = (NavigatorView) views.elementAt(i);
if (view.getName().equals(name)) {
debug(" = "+view);
return view;
}
}
debug(" = null");
return null;
}
COM: <s> gets the navigator view with a specific name </s>
|
funcom_train/36184889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(double[] nB,double[] dNB,double[] bN,double[] dBN){
if(!UMPC){
this.naiveBayesResults.setData(nB);
this.dynamicNaiveBayesResults.setData(dNB);
this.bayesianNetworkResults.setData(bN);
}
this.dynamicBayesianNetworkResults.setData(dBN);
}
COM: <s> set new data in the jbar charts </s>
|
funcom_train/32831134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAllDifferences_notEqualsRightNull() {
Difference result = reflectionComparator.getDifference(objectsA, objectsNullValue);
Difference difference = getInnerDifference("string2", result);
assertEquals("test 2", difference.getLeftValue());
assertEquals(null, difference.getRightValue());
}
COM: <s> test case for 2 objects with a right value null </s>
|
funcom_train/24379608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void callSearchAndReplaceNodeByID(MathType mathType) {
MQMain.logger.debug("MQModel: callSearchAndReplaceNodeByID");
String id = mathType.getId();
assessmentItemHelper = new MQContentPackage(assessmentItemHelper);
assessmentItemHelper.setAssessmentItemType(searchAndReplaceNodeByID
(assessmentItemHelper.getAssessmentItemType(), mathType, MQTYPE.MATH, id));
setMQAssessmentItem();
}
COM: <s> calls the search and replace node by id </s>
|
funcom_train/18724097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getKeyByValue(Hashtable ht, String value){
java.util.Enumeration et=ht.elements();
java.util.Enumeration files=ht.keys();
while(et.hasMoreElements()){
String n=(String)et.nextElement();
String key=(String)files.nextElement();
if(n.equals(value)){
return key;
}
}
return "";
}
COM: <s> the speed of this method must be increased </s>
|
funcom_train/18548188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(Vector vto, Connection c) throws DataAccessException {
if (vto!=null){
Iterator i = vto.iterator();
while(i.hasNext()){
UserTO uto = (UserTO)i.next();
this.insert(uto, c);
}
}
}
COM: <s> insert a list of new user into data base related with project id </s>
|
funcom_train/15723917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public X509Certificate deleteCertificate(X509Certificate certificate) {
X509Certificate[] certs = getCertificates();
boolean append = false;
for (int i = 0; i < certs.length; i++) {
if (!certs[i].equals(certificate)) {
addCertificate(certs[i], append);
append = true;
}
}
return (certificate);
}
COM: <s> removes the provided certificate from the file </s>
|
funcom_train/3445476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FilteredTable getFilteredGraph() {
if (filteredGraph == null) {
filteredGraph =
new FilteredTable(
getGraph().getVertexTable(),
new ComposeExceptFilter(
new ExceptNamed(OutDegree.OUTDEGREE_COLUMN),
new ComposeExceptFilter(
new ExceptNamed(InDegree.INDEGREE_COLUMN),
InternalFilter.sharedInstance())));
}
return filteredGraph;
}
COM: <s> return a filtered graph for the vertex table </s>
|
funcom_train/16093681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculatePrices() {
double holdSum = 0.00;
for(int i=0;i<table2.getRowCount();i++) {
holdSum += new Double(table2.getValueAt(i,table2.getColumnCount()-2).toString()).doubleValue();
}
String prodprice = ExtendedDouble.round(holdSum, 2, BigDecimal.ROUND_HALF_UP);
jTFBrutto2.setText(prodprice);
}
COM: <s> calculate the prices </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.