__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/2333060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pairsMatching(final IntIntProcedure condition, final IntArrayList keyList, final IntArrayList valueList) {
keyList.clear();
valueList.clear();
forEachPair(new IntIntProcedure() {
public boolean apply(int key, int value) {
if (condition.apply(key, value)) {
keyList.add(key);
valueList.add(value);
}
return true;
}
});
}
COM: <s> fills all pairs satisfying a given condition into the specified lists </s>
|
funcom_train/10231400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSubclassConcepts() {
myLogger.info("Adding subclass concepts as vertices to the network");
// Iterate over all formulas
Formula formula = new Formula();
for (Object formulaObject : kifParser.formulaList) {
formula.read((String) formulaObject);
// Subclass formulas
if (formula.car().equals("subclass")) {
String label = formula.getArgument(1);
if (!label.equals("")) {
if (!network.containsVertex(label)) {
network.addVertex(label,
nl.vu.cs.pato.net.Vertex.Shape.ELLIPSE);
}
}
}
}
}
COM: <s> adds the concepts that occur as first arguments in subclass formulas to </s>
|
funcom_train/38755186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addGuardedBlock(Block block) throws BadLocationException {
AbstractDocument doc = (AbstractDocument) textArea.getDocument();
guardFilter.addGuardedBlock(doc.createPosition(
block.fromOffset), doc.createPosition(block.toOffset-1));
textArea.getHighlighter().addHighlight(
block.fromOffset+1, block.toOffset-1,
guardblockHighlightPainter);
}
COM: <s> add a guarded block </s>
|
funcom_train/30009206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetHyperlink() {
System.out.println("setHyperlink");
File link = null;
ScanObject instance = new ScanObject();
instance.setHyperlink(link);
// 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 hyperlink method of class papyrus </s>
|
funcom_train/33371373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix sub(Matrix m) {
if(m.col != col || m.row != row)
throw new RuntimeException("Matrix dimension mismatch");
Matrix result = new Matrix(row, col);
for(int i=0; i<row; i++) {
for(int j=0; j<col; j++) {
result.set(sub(get(i, j), m.get(i, j)), i, j);
}
}
return result;
}
COM: <s> substracts this matrix and the given one </s>
|
funcom_train/44778395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(Object columnHeading, Object rowHeading) {
if (!myHasRowHeadings) {
throw new IllegalStateException("AbstractTable: get: can't use this method when no row headings.");
}
int column = myColumnHeadings.indexOf(columnHeading);
int row = myRowHeadings.indexOf(rowHeading);
return get(column, row);
}
COM: <s> get the data associated with specified column heading </s>
|
funcom_train/21884124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateEnvironment() throws SetupException {
// valid ant install
if (!checkIfDir(ANT_HOME_PROP, antHome)) {
throw new SetupException(antHome + " is not a valid Ant install");
}
fileExists(buildfile, true);
//TODO: do we need to verify info from the manifest properties?
}
COM: <s> checks the basic install assumptions </s>
|
funcom_train/36148738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getColumnsWithData() {
Vector<Integer> columns = new Vector<Integer>();
for (int i=0; i < getColumnCount(); i++) {
for (int j=1; j < getRowCount(); j++) {
if (hasData(getValueAt(j,i))) {
columns.addElement(new Integer(i));
break;
}
}
}
return columns;
}
COM: <s> returns the column number of columns that contain data </s>
|
funcom_train/7603266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getPackageName(IFolder folder) {
IPath myPath = getPath();
IPath pkgPath = folder.getFullPath();
int mySegmentCount = myPath.segmentCount();
int pkgSegmentCount = pkgPath.segmentCount();
StringBuffer pkgName = new StringBuffer(INamespaceFragment.DEFAULT_PACKAGE_NAME);
for (int i = mySegmentCount; i < pkgSegmentCount; i++) {
if (i > mySegmentCount) {
pkgName.append('.');
}
pkgName.append(pkgPath.segment(i));
}
return pkgName.toString();
}
COM: <s> returns the package name for the given folder which is a decendent of </s>
|
funcom_train/42294614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNode(double position, Color color) {
ListIterator<Node> itr = nodes.listIterator();
Node newNode = new Node(position, color);
while(itr.hasNext()) {
Node node = (Node)itr.next();
if(node.position == position) {
itr.remove();
itr.add(newNode);
return;
}
if(node.position >= position)
{
itr.add(newNode);
return;
}
}
itr.add(newNode);
}
COM: <s> adds a new node to this object </s>
|
funcom_train/25963459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("STSCustomer".equals(portName)) {
setSTSCustomerEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/124172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextCarefully(String text) {
int selStart = getSelectionStart();
int selEnd = getSelectionEnd();
int pos = getCaretPosition();
setText(text);
int ll = getText().length();
// Set caret again.
if (pos < ll)
setCaretPosition(pos);
// Set selection again.
if (selStart < ll)
setSelectionStart(selStart);
if (selEnd < ll)
setSelectionEnd(selEnd);
else
setSelectionEnd(ll);
lastValidText = getText();
}
COM: <s> sets the text but preserves selection and caret position </s>
|
funcom_train/49319478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
if (_fileChooser == null) {
_fileChooser = makeImageFileChooser();
}
int option = _fileChooser.showOpenDialog(this);
if (option == JFileChooser.APPROVE_OPTION && _fileChooser.getSelectedFile() != null) {
setFilename(_fileChooser.getSelectedFile().getAbsolutePath());
}
}
COM: <s> display a file chooser to select a filename to display </s>
|
funcom_train/6203415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startElementSub(Attributes attributes) {
currentElement.push(TMX_TAG_SUB);
// create new entries in the current TUV's sub segment list and on the
// stack
// NOTE: the assumption is made here that sub segments are
// in the same order in both source and target segments
StringBuffer sub = new StringBuffer();
tuvs.get(tuvs.size() - 1).subSegments.add(sub);
currentSub.push(sub);
}
COM: <s> handles the start of a sub inline element </s>
|
funcom_train/1784693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double attribute(final Variable variable, final String name) {
final Attribute attribute = variable.findAttribute(name);
if (attribute != null) {
widestType = widest(attribute.getDataType(), widestType);
final Number value = attribute.getNumericValue();
if (value != null) {
return value.doubleValue();
}
}
return Double.NaN;
}
COM: <s> returns the attribute value as a </s>
|
funcom_train/45692473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumSamplesStereoEmptyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EsxFile_numSamplesStereoEmpty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_numSamplesStereoEmpty_feature", "_UI_EsxFile_type"),
EsxPackage.Literals.ESX_FILE__NUM_SAMPLES_STEREO_EMPTY,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the num samples stereo empty feature </s>
|
funcom_train/15512937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show( Component jTable, int mouseX, int mouseY ) {
Point mousePointer = new Point( mouseX, mouseY );
selectedRow = fileTable.rowAtPoint( mousePointer );
enableItems( fileTable.getSelectedRowCount() < 2 , tableModel.getRow( selectedRow ).getFile().exists() );
super.show( jTable, mouseX, mouseY );
}
COM: <s> overwrites the method of the superclass to fetch mouse coordinates </s>
|
funcom_train/45644237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(850, 650));
configurer.setShowCoolBar(true);
configurer.setShowFastViewBars(true);
configurer.setShowMenuBar(true);
configurer.setShowPerspectiveBar(true);
configurer.setShowProgressIndicator(true);
configurer.setShowStatusLine(true);
}
COM: <s> performs arbitrary actions before the window is opened </s>
|
funcom_train/22783116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSmartList(SmartList smartList) {
clearFilterInternal();
// unregister from old
if (this.smartList != null) {
this.smartList.removeListener(smartListObserver);
}
// exchange
this.smartList = smartList;
// register to new
if (this.smartList != null) {
this.smartList.addListener(smartListObserver);
}
// update filter
updateFilterOnView();
}
COM: <s> sets the smartlist to see this will remove the album and import filter </s>
|
funcom_train/12358191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("CPFRWSPort".equals(portName)) {
setCPFRWSPortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/43246242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetDischargeDate() {
System.out.println("setDischargeDate");
Calendar dischargeDate = null;
AdmissionObject instance = new AdmissionObject();
instance.setDischargeDate(dischargeDate);
// 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 discharge date method of class org </s>
|
funcom_train/39166474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transduce(Corpus coll) throws JapeException, ExecutionException {
// for each doc run the transducer
Iterator<Document> iter = coll.iterator();
while(iter.hasNext()) {
Document doc = iter.next();
transduce(doc, doc.getAnnotations(), doc.getAnnotations());
}
} // transduce(coll)
COM: <s> process the given collection </s>
|
funcom_train/30005640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getAuthorLabel() {
if (this.authorLabel == null) {
this.authorLabel = new JLabel(LanguageController.getInstance().getString(this.getPlugin(),
"Plugin_Add_Sequence_Panel_Author_Label"));
}
return this.authorLabel;
}
COM: <s> gets the author label </s>
|
funcom_train/29711650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handleButtonUp(int button) {
if (isInState(STATE_DRAG)) {
// XXX: commented the following two line (lium)
// performSelection();
// if (button == 1 && getSourceEditPart().getSelected() !=
// EditPart.SELECTED_NONE)
// getCurrentViewer().reveal(getSourceEditPart());
setState(STATE_TERMINAL);
return true;
}
return false;
}
COM: <s> if in the drag state the tool selects the source edit part </s>
|
funcom_train/10944921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Timestamp getReservStart(BigDecimal addDays) {
if (addDays.compareTo(BigDecimal.ZERO) == 0)
return this.reservStart;
else {
if (this.reservStart != null)
return new Timestamp((long)(this.reservStart.getTime() + (addDays.doubleValue() * 86400000.0)));
else
return null;
}
}
COM: <s> returns the reservation start date with a number of days added </s>
|
funcom_train/33403261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public L select2() {
final BBDAPIPrincipal userAccess = new BBDAPIPrincipal("Duke", "Java");
selectHello2.setBbdPrincipal(userAccess);
final BBDConnection<R,L> myConnection = new BBDConnection<R,L>();
L bbdRowAL = (L)new BBDRowArrayList<R>();
try {
bbdRowAL = myConnection
.executeQuery(selectHello2, "Duke");
} catch (final SQLException e) {
log.severe(e.toString());
}
return bbdRowAL;
}
COM: <s> ask the database for information by passing input parameter to </s>
|
funcom_train/18377106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showHeader() {
if (myHeader == null && headerConstructor != null) {
myHeader = createInternalControl(controlHolder, headerConstructor);
if (myHeader instanceof Composite) {
Composite headerComp = (Composite) myHeader;
if (headerComp.getLayout() == null) {
headerComp.addPaintListener(headerPaintListener);
}
}
layoutChild(myHeader);
}
}
COM: <s> if the header control hasnt been created yet create and show it </s>
|
funcom_train/10790998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Connection getConnection() throws SQLException {
// try to obtain a connection from the primary datasource
DataSource ds = conf.getDataSource(null);
if(ds == null) {
// use datasource 2 if available
ds = conf.getDataSource2(null);
}
if (ds != null) {
return ds.getConnection();
}
// throw
throw new SQLException("Unable to obtain a datasource");
}
COM: <s> obtain a connection from the configuration </s>
|
funcom_train/5775587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LMenu getLocaleMenu() {
if (localeMenu == null) {
localeMenu = new LMenu();
localeMenu.setCaptionTag("LFA Frame.localeMenu");
localeMenu.setText("Locale");
localeMenu.add(getLocaleDetails());
}
return localeMenu;
}
COM: <s> this method initializes locale menu </s>
|
funcom_train/20433564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getColorChooseBtn() {
if (colorChooseBtn == null) {
colorChooseBtn = new JButton();
colorChooseBtn.setPreferredSize(new Dimension(90, 30));
colorChooseBtn.setText("Colors");
colorChooseBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
JColorChooser.showDialog(ConfigurationPanel.this,
"Choose color for player", Color.blue);
}
});
}
return colorChooseBtn;
}
COM: <s> this method initializes color choose btn </s>
|
funcom_train/39467134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(@NotNull final String uri) throws IOException, ParserConfigurationException, SAXException {
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
final DocumentBuilder db = dbf.newDocumentBuilder();
final Document doc = db.parse(uri);
bookmarks = new BookmarkFolder(doc);
}
COM: <s> load bookmarks from a file </s>
|
funcom_train/30237895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object makeArguments(Object o, FinderReturn mfr){
if(null == o){
return null;
} else if (o instanceof Object[]){
// Turn object arrays into collections
return Arrays.asList((Object[])o);
} else if(o instanceof Collection){
return o;
} else if( o instanceof Map){
Map map = (Map)o;
map.remove("head");
return map;
} else {
return o;
}
}
COM: <s> p normalize incoming data p </s>
|
funcom_train/2902979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(ZCommand cmd){
int type = cmd.getCommandType();
if(type == LinuxSupportedTask.FORK_EXEC){
startApplication(cmd.getArguments());
}
else if(type == LinuxSupportedTask.EXEC_JAR){
startJava(cmd.getArguments(), cmd.getJvmOptions(), type);
}
else if(type == LinuxSupportedTask.EXEC_CLASS){
startJava(cmd.getFQC(), cmd.getJvmOptions(), type);
}
else{
new JXError(getClass(), "Unsupported buildin command");
}
}
COM: <s> launch an application or build in command </s>
|
funcom_train/17060585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FactorNode createFactorNode(String name) {
FactorNode myRecord = new FactorNode();
myRecord.initialize();
myRecord.setLinePen(JGoPen.blue);
myRecord.setSpacing(3);
myRecord.setScrollBarOnRight(true);
myRecord.setVertical(true);
JGoText title = new JGoText(name);
title.setAlignment(JGoText.ALIGN_CENTER);
title.setBkColor(JGoBrush.ColorBlue);
title.setTextColor(JGoBrush.ColorWhite);
title.setBold(true);
title.setAutoResize(true);
title.setClipping(true);
myRecord.setHeader(title);
return myRecord;
}
COM: <s> create an individual factor node object to display on the screen </s>
|
funcom_train/25395150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHapticEnabled(final boolean aHapticEnabled, final boolean aAffectChildren) {
// update current object
hapticEnabled = aHapticEnabled;
// update children
if (aAffectChildren) {
for (int i = 0; i < childrens.size(); i++) {
childrens.get(i).setHapticEnabled(aHapticEnabled, true);
}
}
}
COM: <s> allow or disallow the object to be felt when visible </s>
|
funcom_train/27711413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLocalpart(int i) {
if (i < 0 || i >= fAttributeListLength) {
return null;
}
int chunk = (fAttributeListHandle + i) >> CHUNK_SHIFT;
int index = (fAttributeListHandle + i) & CHUNK_MASK;
return fStringPool.toString(fAttLocalpart[chunk][index]);
}
COM: <s> return the local part of an attribute in this list by position </s>
|
funcom_train/29598126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopPacketConsumerThread() {
log.debug("Stopping thread " + this.getInstanceName());
if (packetConsumerThread != null) {
try {
packetConsumerThread.interrupt();
packetConsumerThread.join();
log.debug("Stoppen von " + this.getInstanceName() + " funktioniert!");
} catch (final InterruptedException e) {
log.debug("Stoppen von " + this.getInstanceName() + " klappt nicht richtig!");
Thread.currentThread().interrupt();
}
}
}
COM: <s> stops the thread which consumes the packets available in the packet queue </s>
|
funcom_train/7635625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endAdding(GL10 gl) {
checkState(STATE_ADDING, STATE_INITIALIZED);
gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID);
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, mBitmap, 0);
// Reclaim storage used by bitmap and canvas.
mBitmap.recycle();
mBitmap = null;
mCanvas = null;
}
COM: <s> call to end adding labels </s>
|
funcom_train/14329563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBatchEsc() throws Exception {
Statement stmt = con.createStatement();
stmt.execute("CREATE TABLE #TESTBATCH (ts datetime)");
stmt.addBatch("INSERT INTO #TESTBATCH VALUES ({ts '1999-01-01 23:50:00'})");
int counts[] = stmt.executeBatch();
assertEquals(1, counts[0]);
stmt.close();
}
COM: <s> test for bug 1180169 jdbc escapes not allowed with sybase add batch </s>
|
funcom_train/1111880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scrollCellToVisible(Object cell) {
Rectangle2D bounds = getCellBounds(cell);
if (bounds != null) {
Rectangle2D b2 = toScreen((Rectangle2D) bounds.clone());
scrollRectToVisible(new Rectangle((int) b2.getX(), (int) b2.getY(),
(int) b2.getWidth(), (int) b2.getHeight()));
}
}
COM: <s> scrolls to the specified cell </s>
|
funcom_train/10361438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document generateBeanFactoryDump(final ConfigurableListableBeanFactory beanFactory) throws ParserConfigurationException {
assert beanFactory != null;
Document result = createDocument();
ElementBuilder builder = new ElementBuilder(result);
generateRoot(builder);
generateBeanAliases(beanFactory, builder);
generateBeanDefinitions(beanFactory, builder);
result.getDocumentElement().normalize();
return result;
}
COM: <s> creates dom document that contains declaration of given bean factory </s>
|
funcom_train/5722664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String editFolderEntry() {
LOGGER.debug("editing folder entry");
final FolderEntryInfo entry = data.getRowData();
if (entry.isFolder()) {
FolderInfo selectedFolder = documentService.getFolder(entry);
setSessionBean(Constants.COLLABORATION_SELECTED_FOLDER, selectedFolder);
return Constants.COLLABORATION_EDIT_FOLDER_PAGE;
} else {
FileInfo selectedFile = documentService.getFileEntry(entry.getId(), false);
setSessionBean(Constants.COLLABORATION_SELECTED_FILEENTRY, selectedFile);
return Constants.COLLABORATION_EDIT_FILEENTRY_PAGE;
}
}
COM: <s> edits a folder entry </s>
|
funcom_train/37415510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String p = "";
Enumeration names = propertyNames();
while(names.hasMoreElements()) {
String n = (String)names.nextElement();
String v = getProperty(n);
if(p.equals("") == false)
p += " ";
if(v == null)
p += n;
else
p += n + "='" + v + "'";
}
return(p);
}
COM: <s> convert properties to string in html tag format </s>
|
funcom_train/7638680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshUiNode() {
if (mTreeBlock != null) {
UiElementNode manifest = mEditor.getUiRootNode();
AndroidManifestDescriptors manifestDescriptor = mEditor.getManifestDescriptors();
mTreeBlock.changeRootAndDescriptors(manifest,
new ElementDescriptor[] {
manifestDescriptor.getInstrumentationElement()
},
true /* refresh */);
}
}
COM: <s> changes and refreshes the application ui node handled by the sub parts </s>
|
funcom_train/19108846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveSettings() {
mTableProg.saveSettings(new File("TableProg.xml").getAbsolutePath());
mTableSong.saveSettings(new File("TableSong.xml").getAbsolutePath());
mTableCompil.saveSettings(new File("TableCompil.xml").getAbsolutePath());
}
COM: <s> saves the settings </s>
|
funcom_train/45692747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReservedBitsByte7PropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PartAudioIn_reservedBitsByte7_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PartAudioIn_reservedBitsByte7_feature", "_UI_PartAudioIn_type"),
EsxPackage.Literals.PART_AUDIO_IN__RESERVED_BITS_BYTE7,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the reserved bits byte7 feature </s>
|
funcom_train/22799665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bulkDelete(String configRepositoryPath, List<File> fileList) {
// Loop through the fileList to do deletion.
for (File file : fileList) {
// Debug
//System.out.println("debug: deleting " + configRepositoryPath + file.getPhysicalName());
deletePhysicalFile(configRepositoryPath, file.getPhysicalName());
}
}
COM: <s> this would accept a list of files to delete </s>
|
funcom_train/32636002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
Session hibernateSession = HibernateController.instance().createSession();
Transaction tx = null;
try {
tx = hibernateSession.beginTransaction();
hibernateSession.update(this);
tx.commit();
// Clean up the session.
hibernateSession.close();
} catch (HibernateException e) {
e.printStackTrace();
try {
tx.rollback();
} catch (Exception e2) {
// Silent failure.
} finally {
try {
if (hibernateSession != null)
hibernateSession.close();
} catch (Exception e3) {
// Silent failure.
}
}
}
}
COM: <s> updates this volunteer in the database </s>
|
funcom_train/24288771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setValue(int newValue, boolean updateTextField, boolean firePropertyChange) {
int oldValue = value;
if (newValue < min) {
value = min;
} else if (newValue > max) {
value = max;
} else {
value = newValue;
}
if (updateTextField) {
textField.setText(Integer.toString(value));
textField.setForeground(Color.black);
}
if (firePropertyChange) {
firePropertyChange("value", oldValue, value); //$NON-NLS-1$
}
}
COM: <s> sets the value attribute of the jspin field object </s>
|
funcom_train/49044624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNewValueVariablePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ModifyObjectReaction_newValueVariable_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ModifyObjectReaction_newValueVariable_feature", "_UI_ModifyObjectReaction_type"),
EventPackage.Literals.MODIFY_OBJECT_REACTION__NEW_VALUE_VARIABLE,
!((ModelObject) object).isPredefined(),
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the new value variable feature </s>
|
funcom_train/42480733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getMiProjectNew() {
if (miProjectNew == null) {
miProjectNew = new JMenuItem();
miProjectNew.setText(Msg.getString("label.create.project")); //$NON-NLS-1$
miProjectNew.setToolTipText(Msg.getString("label.create.project.tooltip")); //$NON-NLS-1$
}
return miProjectNew;
}
COM: <s> this method initializes mi project new </s>
|
funcom_train/37619500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void andNotAnd(BitVector set1, BitVector set2) {
int n = Math.min(this.length(),
Math.min(set1.length(), set2.length()));
for (int i = 0; i < n; i++) {
andW(i, ~(set1.getW(i) & set2.getW(i)));
}
}
COM: <s> do this this s1 s2 </s>
|
funcom_train/1905042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadXMLDocumentHTMLFormat() throws PropertyNotFoundException {
debug("\nRunning: testReadXMLDocumentHTMLFormat test");
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
+ PropertyService.getProperty("document.accNumSeparator") + "1";
assertTrue(handleReadAction(name, "html"));
}
COM: <s> test read a xml document in html format successfully </s>
|
funcom_train/9892675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onSaveMatrix() {
try {
ExperimentUtil.saveExperiment(mainframe, data.getExperiment(), data);
addHistory("Save Data Matrix to File");
} catch (Exception e) {
JOptionPane.showMessageDialog(mainframe, "Can not save matrix!", e.toString(), JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
}
}
COM: <s> saves the framework data ratio values </s>
|
funcom_train/14238089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillWidth(Rectangle bounds, int minWidth, ResizeDirection rd) {
if(bounds.width >= minWidth)
return;
if(rd == NORTHWEST || rd == WEST || rd == SOUTHWEST) {
bounds.x -= (minWidth - bounds.width);
bounds.width = minWidth;
}
else if(rd == NORTHEAST || rd == EAST || rd == SOUTHEAST) {
bounds.width = minWidth;
}
}
COM: <s> take the given bounds and make sure it fills min width </s>
|
funcom_train/11102310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String value(ShaleWebContext context) {
String servletPath = context.getRequest().getServletPath();
if (servletPath == null) {
servletPath = "";
}
String pathInfo = context.getRequest().getPathInfo();
if (pathInfo == null) {
pathInfo = "";
}
return servletPath + pathInfo;
}
COM: <s> p return the servlet path if any concatenated with the path info </s>
|
funcom_train/17504912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Type completionError(DiagnosticPosition pos, CompletionFailure ex) {
log.error(pos, "cant.access", ex.sym, ex.getDetailValue());
if (ex instanceof ClassReader.BadClassFile) throw new Abort();
else return syms.errType;
}
COM: <s> report a failure to complete a class </s>
|
funcom_train/3791308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean belongsTo(Cell c) {
int ydiff = c.getY()-_ref.getY();
int xdiff = c.getX()-_ref.getX();
if ( xdiff > _maxWidth || xdiff < 0)
return false;
if ( ydiff > _maxHeight || ydiff < 0)
return false;
return true;
}
COM: <s> this method should be constant time o c </s>
|
funcom_train/10498157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
minCommittedLog = 0;
maxCommittedLog = 0;
/* to be safe we just create a new
* datatree.
*/
dataTree = new DataTree();
sessionsWithTimeouts.clear();
WriteLock lock = logLock.writeLock();
try {
lock.lock();
committedLog.clear();
} finally {
lock.unlock();
}
initialized = false;
}
COM: <s> clear the zkdatabase </s>
|
funcom_train/45385249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepareExport() {
expType = CESE.getEnvironment().getModelManager().getExpType();
frame = CESE.getEnvironment().getDesktop().addFrame();
frame.setClosable(false);
if ((model.getsteps() <= 0) || (model.getdt() <= 0))
throw new IllegalArgumentException();
createChannels();
if (expType == CLAMP_EXPERIMENT) builder.buildRecord(model);
}
COM: <s> prepares export to the top new tt results view tt window based on </s>
|
funcom_train/20308043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Graph createDeductionsGraph() {
if (fdeductions != null) {
Graph dg = fdeductions.getGraph();
if (dg != null) {
// Reuse the old graph in order to preserve any listeners
dg.getBulkUpdateHandler().removeAll();
return dg;
}
}
return Factory.createGraphMem( style );
}
COM: <s> create the graph used to hold the deductions </s>
|
funcom_train/48698224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
mainPanel.add(createDocumentFlexTable());
mainPanel.add(pickOne);
pickOne.addStyleName("selectLabel");
mainPanel.add(createUploadFormPanel());
RootPanel panel = RootPanel.get("documentList");
DOM.setInnerHTML(panel.getElement(), "");
panel.add(mainPanel);
// Setup timer to refresh list automatically
Timer refreshTimer = new Timer() {
@Override
public void run() {
refreshDocumentList();
}
};
refreshTimer.scheduleRepeating(REFRESH_INTERVAL);
refreshDocumentList();
}
COM: <s> this is the entry point method </s>
|
funcom_train/40311535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddDependent() {
DBObjectDef tableDef = new DBObjectDef("TABLE");
DBObject dependent = new DBObject(tableDef, "TABLE", null);
DBObject dbObject = new DBObject(definition, NAME, null);
dbObject.addDependent(dependent);
assertEquals("Add dependent failed", dependent, dbObject.getDependent("TABLE", "TABLE"));
}
COM: <s> p test add dependent successfully </s>
|
funcom_train/20115066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Long setMinTime(long milliseconds){
Calendar newDay = Calendar.getInstance();
newDay.setTimeInMillis(milliseconds);
newDay.set(Calendar.HOUR_OF_DAY, 0);
newDay.set(Calendar.MINUTE, 0);
newDay.set(Calendar.SECOND, 0);
newDay.set(Calendar.MILLISECOND, 0);
return newDay.getTimeInMillis();
}
COM: <s> set first millisecond of day </s>
|
funcom_train/32378534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInformation()
{
StringBuffer sb = new StringBuffer();
sb.append("RoleID : " + getRoleId());
sb.append("RoleName : " + getRoleName());
sb.append("Description : " + getRoleDesc());
return sb.toString().trim();
}
COM: <s> returns a complete roles information as a string </s>
|
funcom_train/25647846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setEnableNext(final boolean enableNext) {
this.enableNext = enableNext;
log.debug("Next enable is set " + this.enableNext);
setChanged();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
notifyObservers(new Boolean(enableNext));
}
});
}
COM: <s> calling this notifies all listeners that the next is locked or freed </s>
|
funcom_train/46382270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrimaryViewCell(ViewCell cell) {
if (cell==null)
detach();
else
attach(cell);
ViewCell oldViewCell = primaryViewCell;
primaryViewCell = cell;
// TODO all non primary view cells should track the movements of the primary
notifyViewManagerListeners(oldViewCell, primaryViewCell);
}
COM: <s> set the primary view cell for this client </s>
|
funcom_train/29545648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateIntervalCombo(Combo theCombo) {
// TODO: Add support for Graphics, Export
String[] interval = {"ALL", "1", "2", "3"};
int i = 0;
// Create a list of valid days for the hash map.
while (i < interval.length) {
theCombo.add(interval[i]);
i++;
}
// Now put the values in the Combo menu.
theCombo.setText(interval[2]);
return;
}
COM: <s> populate a combo menu with statistics intervals </s>
|
funcom_train/42644796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferencesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EmbryoText_references_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EmbryoText_references_feature", "_UI_EmbryoText_type"),
EmbryomodelPackage.Literals.EMBRYO_TEXT__REFERENCES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the references feature </s>
|
funcom_train/29693526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void launch(Frame launched) {
// listen to new frame
launched.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
unlaunch();
}
public void windowClosed(WindowEvent e) {
unlaunch();
}
});
// hide menu frame
frame.setVisible(false);
}
COM: <s> hides this window for later </s>
|
funcom_train/18525378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getMethodArrayList(TestObject to) {
List retVal = null;
if (to != null) {
int index = getTestObjectArrayList().indexOf(to);
if (index >= 0) {
retVal = (List) getTestMethodArrayList().get(index);
}
}
return retVal;
}
COM: <s> use the given test object to get the needed method array list </s>
|
funcom_train/43327259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final static public DMatrix Sander() {
DMatrix m;
int i,j;
m = DayhoffMdm78();
for (i=0; i<20; i++) {
for (j=0; j<20; j++)
m.data[i][j] = m.data[i][j] / 7.5 - .8233;
m.data[i][i] = 1.41;
}
return(m);
}
COM: <s> some sander matrix for which i dont have the reference </s>
|
funcom_train/42698098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getLayout(InternalFrameManager manager) {
JInternalFrame[] frames = manager.getAllFrames();
for(JInternalFrame frame : frames) {
if(frame.isVisible()) {
String groupId = "";
if(manager.getGroupMap().containsKey(frame)) {
groupId = manager.getGroupMap().get(frame);
}
fGroups.add(groupId);
fNames.add(frame.getClass().getCanonicalName());
fLayout.add(frame.getBounds());
}
}
}
COM: <s> captures a layout using the frame managers data </s>
|
funcom_train/3378092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void setNeedClientAuth(boolean flag) {
doClientAuth = (flag ?
SSLEngineImpl.clauth_required : SSLEngineImpl.clauth_none);
if ((handshaker != null) &&
(handshaker instanceof ServerHandshaker) &&
!handshaker.started()) {
((ServerHandshaker) handshaker).setClientAuth(doClientAuth);
}
}
COM: <s> sets the flag controlling whether a server mode engine </s>
|
funcom_train/7842791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXmlToSru() throws Exception {
System.out.println("xmlToSru");
String xml = "";
String expResult = "";
String result = Utilities.xmlToSru(xml);
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 xml to sru method of class org </s>
|
funcom_train/18662603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void requestDelete() {
SortableDefaultMutableTreeNode actionNode = mySetOfNodes.getNode( index );
if ( ( Settings.pictureCollection.countSelectedNodes() > 1 ) && ( Settings.pictureCollection.isSelected( actionNode ) ) ) {
multiDeleteDialog();
} else {
fileDelete( actionNode );
}
}
COM: <s> the delete menu was clicked </s>
|
funcom_train/18704783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InputStream createInputStream() {
try {
if (valid) {
readcounter = 0;
writecounter = 0;
if (file == null) {
if (inStream != null)
return inStream;
else
valid = false;
} else {
return new BufferedInputStream(new FileInputStream(file));
}
}
} catch(FileNotFoundException e) {
valid = false;
}
return null;
}
COM: <s> internal method to create an input stream from file for reading image </s>
|
funcom_train/20109057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
runDiskCacheThread = false;
if (diskCacheThread == null) {
runDiskCacheThread = true;
return;
}
diskCacheThread.interrupt();
try {
diskCacheThread.join();
} catch (InterruptedException e) {}
diskCacheThread = null;
runDiskCacheThread = true;
}
COM: <s> clean up internal resources employed by the image cache </s>
|
funcom_train/31347864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exit() {
if (delegate != null && !delegate.stop(this)) {
return;
}
Editor editor;
Window win;
Component component;
for (int i = 0; i < editors.size(); i++) {
editor = (Editor)(editors.elementAt(i));
if (!canClose(editor)) {
return;
}
}
while (editors.size() > 0) {
editor = (Editor)(editors.elementAt(0));
close(editor, false);
}
System.exit(0);
}
COM: <s> performs any necessary cleanup and then exits the application </s>
|
funcom_train/7640442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int setStatus(String message, int messageType) {
if (message == null) {
setErrorMessage(null);
setMessage(null);
} else if (!message.equals(getMessage())) {
setMessage(message, messageType == MSG_WARNING ? WizardPage.WARNING : WizardPage.ERROR);
}
return messageType;
}
COM: <s> sets the error message for the wizard with the given message icon </s>
|
funcom_train/25952685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeoPoint fromPixels(float x, float y) {
/* Subtract the offset caused by touch. */
x -= OpenStreetMapView.this.mTouchMapOffsetX;
y -= OpenStreetMapView.this.mTouchMapOffsetY;
return bb.getGeoPointOfRelativePositionWithLinearInterpolation(x / viewWidth, y
/ viewHeight);
}
COM: <s> converts x y screen coordinates to the underlying geo point </s>
|
funcom_train/1049444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSpinner getImportanceSpinner() {
if (importanceSpinner == null) {
importanceSpinner = new JSpinner();
importanceSpinner.setFont(new java.awt.Font("Arial", java.awt.Font.PLAIN, 12));
importanceSpinner.setBounds(new java.awt.Rectangle(52,25,70,20));
//importanceSpinner.setModel(getValueRange());
importanceSpinner.setModel(getImportanceRange());
importanceSpinner.setToolTipText("importance");
//importanceSpinner.setEditor(new JSpinner.NumberEditor(importanceSpinner,"00.00"));
}
return importanceSpinner;
}
COM: <s> this method initializes j spinner </s>
|
funcom_train/35838179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPopupMenu(LinkUI linkui, int x, int y) {
// String userID = ProjectCompendium.APP.getModel().getUserProfile().getId();
// UILinkPopupMenu pop = new UILinkPopupMenu("Popup menu", linkui, "");
// pop.setCoordinates(x,y);
// pop.setViewPane(getViewPane());
// pop.show(this,x,y);
}
COM: <s> open a popup menu for this link </s>
|
funcom_train/2624224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWidgetAttributes(String id, String type, Widget parentWidget, Window window, Point2D.Float coord, String title, boolean visible, String widgetClass, String replayableAction) {
super.setAttributes(id, type, parentWidget, window, coord, title, visible);
this.widgetClass = widgetClass;
this.replayableAction = replayableAction;
}
COM: <s> sets this widgets attributes to the incoming values </s>
|
funcom_train/15490800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) {
imageUpdateY = y;
imageUpdateW = w;
if ((flags & ERROR) != 0) {
errorLoadingImage = true;
return false;
}
imageLoaded = (flags & (ALLBITS|FRAMEBITS|ABORT)) != 0;
return !imageLoaded;
}
COM: <s> used by image plus to monitor loading of images </s>
|
funcom_train/42346749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object run(Object src, String methodName, Object[] args) {
List<Class<?>> argTypes = new ArrayList<Class<?>>();
for(Object o : args)
argTypes.add(o.getClass());
try {
return MethodUtils.invokeMethod(src, methodName, args, argTypes.toArray(new Class<?>[args.length]));
} catch(Exception e) {
LOG.error("Error invoking method!", e);
return null;
}
}
COM: <s> p execute a method against an object returned from another api call p </s>
|
funcom_train/21461735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRequestValues(Map<String, Object> params) {
if (params != null && params.size() > 0) {
for (Entry<String, Object> entry : params.entrySet()) {
setRequestValue(entry.getKey(), entry.getValue());
}
}
}
COM: <s> place all these params into the request storage </s>
|
funcom_train/2501383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Location findLocationRecursive(Location root, String nameToFind){
Location retorno = null;
log.debug("Finding location");
if (root != null){
if (root.getName().equals(nameToFind)){
retorno = root;
}else if (root.getSun(nameToFind) != null){
retorno = root.getSun(nameToFind);
}else{
for (Location sun : root.getAllSuns()){
if (retorno == null){
retorno = findLocationRecursive(sun, nameToFind);
}
}
}
}
return retorno;
}
COM: <s> recursive search for a location from name </s>
|
funcom_train/10766315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String msgAlreadyDefinedIn(String thing, String name, String origin, String redef) {
return this.format("The {0} {1} defined in {3} was already defined in {2}.",
thing, name, origin, redef);
}
COM: <s> format an error message about a code thing code being </s>
|
funcom_train/37835588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Composite getBlend(String colorMode) {
if ("multiply".equals(colorMode)) {
return Blend.Multiply;
} else if ("screen".equals(colorMode)) {
return Blend.Screen;
} else if ("truecolor".equals(colorMode)) {
return Blend.TrueColor;
} else if ("bleach".equals(colorMode)) {
if (zoneInfo.getZoneColor() != null) {
return Blend.createBleach(zoneInfo.getZoneColor());
}
}
return null;
}
COM: <s> get composite mode from a string identifier </s>
|
funcom_train/9651551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line = null;
while ((line = br.readLine()) != null) {
fullLine = fullLine + line + "\n";
}
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
COM: <s> main processing method for the process stream reader object </s>
|
funcom_train/21357129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBase64Strings(Collection<Base64StringBean> iBase64Strings) {
if (iBase64Strings == null || iBase64Strings.size() != 1) {
throw new IllegalStateException("The Base64StringBean collection should have one and only one entry for each binary array object");
}
this.iBase64Strings = iBase64Strings;
refreshBase64String();
}
COM: <s> sets the collection of base 64 chunks held by this bean </s>
|
funcom_train/39468005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showDialog() {
if (dialog == null) {
dialog = createDialog(parent, JSAXErrorHandler.ACTION_BUILDER.getString("saxError_title"));
closeButton.requestFocusInWindow();
dialog.getRootPane().setDefaultButton(closeButton);
dialog.setModal(false);
dialog.setResizable(true);
dialog.setVisible(true);
}
}
COM: <s> show the dialog </s>
|
funcom_train/8439154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdAbout() {
if (cmdAbout == null) {//GEN-END:|159-getter|0|159-preInit
// write pre-init user code here
cmdAbout = new Command("\u041E \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0435", Command.ITEM, 2);//GEN-LINE:|159-getter|1|159-postInit
// write post-init user code here
}//GEN-BEGIN:|159-getter|2|
return cmdAbout;
}
COM: <s> returns an initiliazed instance of cmd about component </s>
|
funcom_train/36247672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drainInputStream(InputStream in, StringBuilder builder) throws IOException {
BufferedInputStream bufferedInputStream = new BufferedInputStream(in);
byte[] buffer = new byte[1024];
while (bufferedInputStream.available() > 0) {
int read = bufferedInputStream.read(buffer, 0, buffer.length);
if (read > 0) {
builder.append(new String(buffer, 0, read));
}
}
}
COM: <s> reads all available data from the specified input stream and writes it to </s>
|
funcom_train/39872751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel() {
if (mStarted && !mEnded) {
if (mListener != null) mListener.onAnimationEnd(this);
mEnded = true;
}
// Make sure we move the animation to the end
mStartTime = Long.MIN_VALUE;
mMore = mOneMoreTime = false;
}
COM: <s> cancel the animation </s>
|
funcom_train/31626394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getAllData() throws WizardException {
Map returnValue = new HashMap(wizSteps.length);
for (int i = 0; i < wizSteps.length; i++) {
WizardPage oneStep = wizSteps[i];
returnValue.put(oneStep.getId(), oneStep.getData());
}
return returnValue;
}
COM: <s> retrieve all the data for the wizard keyed by page id </s>
|
funcom_train/9874375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteDataGraphNode(int chrom, String exp) {
//ArrayList chromList = displayStateManager.getCurrentDataset().getChromosomes();
//Chromosome chromosome = (Chromosome)chromList.get(chrom);
if(chromNodeHash.containsKey(chrom/*chromosome.getNumber()*/+","+exp)) {
chromNodeHash.remove(chrom/*chromosome.getNumber()*/+","+exp);
}
}
COM: <s> deletes the gene data graph node corresponding to the given chromosome number </s>
|
funcom_train/9893962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getColorProperty(String key, Color def) {
int r = getIntProperty(key + ".r", -1);
if (r == -1) {
return def;
}
int g = getIntProperty(key + ".g", -1);
if (g == -1) {
return def;
}
int b = getIntProperty(key + ".b", -1);
if (b == -1) {
return def;
}
return new Color(r, g, b);
}
COM: <s> returns the color property of the given key </s>
|
funcom_train/10842506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteFinishedJobs() {
final List<WebloaderJob> toDelete = new LinkedList<WebloaderJob>();
for(WebloaderJob j : jobs.values()) {
if(!j.isRunning()) {
toDelete.add(j);
}
}
synchronized (jobs) {
for(WebloaderJob j : toDelete) {
jobs.remove(j.getJobId());
}
}
}
COM: <s> remove finished jobs from our list of jobs </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.