__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/23267824
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetDireccion() {
System.out.println("setDireccion");
String direccion = "";
Cliente instance = new Cliente();
instance.setDireccion(direccion);
// 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 direccion method of class capa negocios </s>
|
funcom_train/3286129
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected Portlets findParentOf(Portlets portlets, String peid) {
Iterator it = portlets.getPortletsIterator();
while (it.hasNext()) {
Portlets subportlets = (Portlets)it.next();
if (subportlets.getId().equals(peid)) {
return portlets;
}
Portlets found = this.findParentOf(subportlets, peid);
if (found != null) {
return found;
}
}
return null;
}
COM: <s> find the parent portlet set of the given portlets set id </s>
|
funcom_train/47704919
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int disruptService() {
String kill = (String) HaConst.HA_SHELL_MODULE.get("kill");
StringBuffer context = HAModuleReader.shellHead(
HaConst.HA_SHELL_MODULE, this.server.getIp(), this.server
.getUsername(), this.server.getPassword());
String temp = kill + SystemConst.LINE_SEPERATOR;
String process = "cub";
temp = temp.replace("$process", process);
context.append(temp);
HAModuleReader.shellTail(HaConst.HA_SHELL_MODULE, context,
"kill_broker");
return 0;
}
COM: <s> kill the service of broker </s>
|
funcom_train/3787509
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setColumnType(final DataColumn dataColumn, final int type) {
final DataType dType = DataType.getDataType(type);
if (dataColumn != null && dType == null) {
dataColumn.setColumnType(DataType.STRING);
} else if (dataColumn != null) {
dataColumn.setColumnType(dType);
}
}
COM: <s> sets the column type attribute of the jdbc adapter object </s>
|
funcom_train/37082686
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void createAnnotation(int low, int high, int strand, String type) {
Vector features = new Vector();
if (type == null)
type = "tmptype";
SeqFeatureI sf = new SeqFeature(low,high,type,strand);
features.addElement(sf);
addAnnotation(features, false, type);
}
COM: <s> this method uses </s>
|
funcom_train/3473075
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setMode(int mode) {
this.mode = mode;
if (mode == SHOW) {
savedDrawTool = tool();
setTool(nullTool);
view.setVisible(false);
setCursorActive(false);
} else if (mode == DRAW) {
if (savedDrawTool != null) {
setTool(savedDrawTool);
}
view.setVisible(true);
setCursorActive(true);
}
repaint();
}
COM: <s> sets the mode of the drawing pane </s>
|
funcom_train/13515781
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setDefaults() {
//set the version field to 4 first
BitMask m = new BitMask(this.read(0, 1));
m.setBit(1, true);
this.write(0, m.toByteArray(), 0, 1);
this.setTotalLength(this.getSize());
this.setDontFragment(false);
this.setMoreFragments(false);
this.setTTL(255);
}
COM: <s> sets some default values to the fields of the packet </s>
|
funcom_train/36255392
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public URL resolveURL(URL source, String path) throws IOException {
if (path.startsWith("/")) {
URL url = this.resolver.resolveUrl(path);
if (url == null) {
throw new FileNotFoundException(path
+ " Not Found in ExternalContext as a Resource");
}
return url;
} else {
return new URL(source, path);
}
}
COM: <s> resolves a path based on the passed url </s>
|
funcom_train/34477415
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void initializeSchemaInstance() throws SdaiException {
// associated_models = new ASdaiModel(SdaiSession.setType0toN, this);
validation_date = change_date = System.currentTimeMillis();
validation_result = 3;
validation_level = 0;
modified = false;
committed = false;
allow_model = false;
moved_data_status = 0;
preprocessor_version = " ";
originating_system = " ";
authorization = " ";
}
COM: <s> initializes the fields of this class </s>
|
funcom_train/39911848
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetRh5() {
System.out.println("setRh5");
TextField tf = null;
Page1 instance = new Page1();
instance.setRh5(tf);
// 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 rh5 method of class timesheetmanagement </s>
|
funcom_train/17092866
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: static public int removeClient(String clientIP) {
if(clientIP.equals(null)) {
return -1;
} else {
for(int i=0;i<clientList.length;i++) {
if(clientList[i].equals(clientIP)) {
clientList[i] = "";
return i;
}
}
}
return -1;
}
COM: <s> this method removes a dead client from the active </s>
|
funcom_train/45796954
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private ContentValues setEventsFields(ContentValues values, boolean insert) {
long time = System.currentTimeMillis();
if (insert) {
values.put(ConsumeEvent.COLUMS_CREATED_DATE, time);
values.put(ConsumeEvent.COLUMS_WEEK, getWeek(time));
}
values.put(ConsumeEvent.COLUMS_MODIFIED_DATE, time);
return values;
}
COM: <s> set a set of time field </s>
|
funcom_train/46571119
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Button createCheckButton(final Composite parent, final String label) {
Button button = new Button(parent, SWT.CHECK);
button.setText(label);
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
button.setLayoutData(data);
return button;
}
COM: <s> utility method that creates a push button instance and sets the default </s>
|
funcom_train/3088403
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setDirection(int newDirection) {
switch (newDirection) {
case EchoConstants.TOP :
case EchoConstants.BOTTOM :
case EchoConstants.LEFT :
case EchoConstants.RIGHT :
int oldValue = direction;
direction = newDirection;
firePropertyChange(DIRECTION_CHANGED_PROPERTY, oldValue, newDirection);
break;
default :
throw new IllegalArgumentException(newDirection + " is not a legal direction");
}
}
COM: <s> sets the direction of the news ticker text </s>
|
funcom_train/4471895
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toTemplate(String templatename){
String ret = "{{"+ templatename;
Iterator<Map.Entry<String,Object>> iter = m_data.entrySet().iterator();
while (iter.hasNext()){
Map.Entry<String,Object> entry = iter.next();
ret += String.format("\n |%s=%s", entry.getKey(), entry.getValue());
}
ret +="\n}}";
return ret;
}
COM: <s> translate to wiki template </s>
|
funcom_train/14433834
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void initialise(HeightMap heightMap, int minHeight, int maxHeight, int scale, boolean isIncludeInnerContours) {
this.edgeListBuilder.initialise(heightMap, minHeight, maxHeight, isIncludeInnerContours);
this.controlPointBuilder.setScale(scale);
this.currentEdgeList = null;
}
COM: <s> p initialise the contour builder </s>
|
funcom_train/19166811
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void importProbes(final boolean replace, final Reader in, final SequenceDBDataReader formatter) throws IOException, SequenceFormatException, DuplicateIDException {
if (replace) {
project.getProbes().clear();
project.getTagAllocationTable().clear();
}
project.getProbes().addSequences(SequenceIO.readSequences(in, formatter, DefaultProbe.getSequenceBuilder()));
}
COM: <s> import the probes through the specified format from the specified file </s>
|
funcom_train/40794434
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getContactsCommand1() {
if (contactsCommand1 == null) {//GEN-END:|227-getter|0|227-preInit
// write pre-init user code here
contactsCommand1 = new Command("Open Contacts", Command.ITEM, 0);//GEN-LINE:|227-getter|1|227-postInit
// write post-init user code here
}//GEN-BEGIN:|227-getter|2|
return contactsCommand1;
}
COM: <s> returns an initiliazed instance of contacts command1 component </s>
|
funcom_train/1864329
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ElemWarBoardView (ToyBoxContext ctx, ElemWarController ctrl) {
super(ctx.getFrameManager());
_ctx = ctx;
_ctrl = ctrl;
selectedHex = null;
// listen for mouse motion and presses
addMouseListener(new MouseAdapter() {
public void mouseClicked (MouseEvent e) {
_ctrl.hexClicked(e.getPoint());
}
});
}
COM: <s> constructs a view which will initialize itself and prepare to display the </s>
|
funcom_train/28122516
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void instantiate() {
Class bc = getBoundClass();
if (bc!=null)
try {
Object o = bc.newInstance();
setInstance(o);
} catch (Throwable t) {
if (SerializationMode==SERIALIZE_AUTOINSTANTIATE)
SerializationMode=SERIALIZE_NULL;
setInstance(null);
}
}
COM: <s> attempt to auto instantiate this visualiser </s>
|
funcom_train/51162446
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void importVariables() {
Procedure importer = ((Procedure) js.getGlobalValue("import"));
if (pairs != null) {
js.call("display", "Bindings:\n");
for (int i = 0; i < pairs.length; i = i + 2)
importVariable(((String) pairs[i]), pairs[i+1]);
}
}
COM: <s> import variable value pairs </s>
|
funcom_train/51664845
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void print() {
final PrintDialog dialog= new PrintDialog(fTextWidget.getShell(), SWT.PRIMARY_MODAL);
final PrinterData data= dialog.open();
if (data != null) {
final Printer printer= new Printer(data);
final Runnable styledTextPrinter= fTextWidget.print(printer);
Thread printingThread= new Thread("Printing") { //$NON-NLS-1$
public void run() {
styledTextPrinter.run();
printer.dispose();
}
};
printingThread.start();
}
}
COM: <s> brings up a print dialog and calls code print contents printer code which </s>
|
funcom_train/2385901
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public IChatMeMessage createMeMessage(int aMessageId, IChatSender aSender, String aText) {
IChatMeMessage meMessage = new IChatMeMessage(aMessageId, aSender, COMMON_LINE, aText, WILDCARD);
return meMessage;
}
COM: <s> creates me message </s>
|
funcom_train/3528210
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
String result = new String();
if( exceptions != null ) {
Enumeration list = exceptions.elements();
while (list.hasMoreElements()) {
SlideException e = (SlideException) list.nextElement();
result = result + e.getMessage() + "\n";
}
}
return result;
}
COM: <s> displays the exception message </s>
|
funcom_train/4715706
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void doConnection(boolean silentModeP) throws Exception {
// Send a connecting message
if (!silentModeP) {
fireMessage(handler, ResponseHandler.MSG_CONNECTING);
}
// Connect: try to...
boolean need_shared = !dsmFactory.connect();
// Send a connected message
if (!silentModeP) {
fireMessage(SynoServer.this.handler, ResponseHandler.MSG_CONNECTED);
}
if (need_shared){
fireMessage(SynoServer.this.handler, ResponseHandler.MSG_SHARED_NOT_SET);
}
}
COM: <s> fo the connection </s>
|
funcom_train/14093327
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testReadFileFromClassContextNotFound() {
Class clz = this.getClass();
String fileName = "XMLUtilT.classx";
InputStream actualReturn = m_xmlUtil.readFileFromClassContext(clz, fileName);
assertNull("InputStream is should be null", actualReturn);
}
COM: <s> test read file from class context not found </s>
|
funcom_train/2750275
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void updateSessionCookies() {
Hashtable sessionOriginalCookies = (Hashtable) HDIVUtil.getSession().getWebSession()
.getAttribute(Constants.HDIV_COOKIES_KEY);
if ((sessionOriginalCookies != null) && (sessionOriginalCookies.size() > 0)) {
sessionOriginalCookies.putAll(this.cookies);
HDIVUtil.getSession().getWebSession().setAttribute(Constants.HDIV_COOKIES_KEY,
sessionOriginalCookies);
} else {
HDIVUtil.getSession().getWebSession().setAttribute(Constants.HDIV_COOKIES_KEY,
this.cookies);
}
}
COM: <s> it updates cookies stored in the users session with the wrappers cookies </s>
|
funcom_train/35843937
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int getSectionCount(Container parent) {
int sectionCount = 1;
final int componentCount = parent.getComponentCount();
if (!ignoreSplitters) {
for (int i = 0; i < componentCount; ++i) {
if (parent.getComponent(i) instanceof Seperator) {
++sectionCount;
}
}
}
return sectionCount;
}
COM: <s> determine the number of sections </s>
|
funcom_train/10543230
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void test3UpdateAfterTrigger() throws SQLException{
if (isDerby1482Fixed == false)
return;
if (testWithLargeDataInLOB)
return;
basicSetup();
Statement s = createStatement();
s.execute("create trigger trigger1 after update of bl on table1 referencing " +
"new as n_row for each row " +
"update table2 set updates = n_row.status where table2.id = n_row.id");
commit();
runtest2UpdateTrigger();
}
COM: <s> the after update trigger is defined on lob column but the lob column </s>
|
funcom_train/20841325
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ArrayList getElements() {
ArrayList al = new ArrayList();
Iterator iter;
iter = _movementFieldList.iterator();
while (iter.hasNext())
al.add(((MovementFieldMarked) iter.next()).getMarked());
al.addAll(_edgeMark);
iter = _nodesList.iterator();
while (iter.hasNext())
al.add(((NodeMarked) iter.next()).getMarked());
return al;
}
COM: <s> gets the elements </s>
|
funcom_train/43266583
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
/*
* Hide the Dialog when the cancel button is pressed.
*/
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AddConceptNameDialog.this.setVisible(false);
}
});
cancelButton.setText("Cancel");
}
return cancelButton;
}
COM: <s> this method initializes cancel button </s>
|
funcom_train/50218774
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public EscapeBlock visit_inline_content_escape(Element element) throws ParseException {
String variable = element.getAttributeValue("name");
Expression expr = parseExpressionAttribute(element, "value");
EscapeBlock block = new EscapeBlock(variable, expr);
block.setContent(visit_pattern_inline_content(getElementContentSpecial(element), element));
return block;
}
COM: <s> why do we not allow </s>
|
funcom_train/3830166
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals( Object other ) {
if ( !super.equals( other ) || !( other instanceof GM_Ring_Impl ) ) {
return false;
}
if ( !envelope.equals( ( (GM_Object)other ).getEnvelope() ) ) {
return false;
}
GM_Position[] p2 = ( (GM_Ring)other ).getPositions();
if ( !Arrays.equals( points, p2 ) ) {
return false;
}
return true;
}
COM: <s> checks if this curve segment is completly equal to the submitted geometry </s>
|
funcom_train/17395463
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Square findKingSquare(Color color) {
Square kingSquare = null;
Set<Square> squares = grid.keySet();
for (Iterator<Square> squareIter = squares.iterator(); squareIter.hasNext() && kingSquare == null; ) {
Square square = squareIter.next();
Piece piece = getPiece(square);
if (piece.getPieceType().equals(PieceType.KING) && piece.getColor().equals(color))
kingSquare = square;
}
return kingSquare;
}
COM: <s> locations the square of the king of a given color </s>
|
funcom_train/1147838
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getBackCommand4() {
if (backCommand4 == null) {//GEN-END:|159-getter|0|159-preInit
// write pre-init user code here
backCommand4 = new Command("Back", Command.BACK, 0);//GEN-LINE:|159-getter|1|159-postInit
// write post-init user code here
}//GEN-BEGIN:|159-getter|2|
return backCommand4;
}
COM: <s> returns an initiliazed instance of back command4 component </s>
|
funcom_train/47979723
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setUpXMPPListeners() {
registerExtensions();
_iqListener = new IQListener( _controller );
PacketTypeFilter iqFilter = new PacketTypeFilter( IQ.class );
_xmppConnection.addPacketListener( _iqListener, iqFilter );
_messageListener = new MessageListener( _controller );
PacketTypeFilter messageFilter = new PacketTypeFilter( Message.class );
_xmppConnection.addPacketListener( _messageListener, messageFilter );
}
COM: <s> sets up the xmpp listeners </s>
|
funcom_train/19836454
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object get(Field field) {
notNull("Field", field);
try {
return field.get(instance());
} catch (Exception e) {
throw new MycilaTestingException(e, "Error getting value of field '%s' on test class '%s': %s", field, testClass().getName(), e.getMessage());
}
}
COM: <s> get a fields value </s>
|
funcom_train/18753571
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected ImageIcon createImageIcon(String path) {
java.net.URL imgURL = RefreshControlComponent.class.getClassLoader().getResource(path);
if (imgURL != null) {
return new ImageIcon(imgURL);
} else {
System.err.println("Couldn't find file: " + path);
return null;
}
}
COM: <s> returns an image icon or null if the path was invalid </s>
|
funcom_train/32778757
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void setPriority(int newPriority) {
// get the current process
SimProcess currentProcess = currentSimProcess();
if (currentProcess == null) {
sendWarning("The current process of a cooperation is not found. "
+ "The attempted action is ignored!", "ProcessCoop: "
+ getName() + " Method: setPriority()",
"The current process is only a null pointer.",
"Make sure that only real SimProcesses are cooperating.");
return;
}
currentProcess.setPriority(newPriority);
}
COM: <s> sets the priority of the current sim process to a new integer value </s>
|
funcom_train/5072593
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getJavadocStringWithoutDelimiters(String text) {
String result = "";
StringTokenizer st = new StringTokenizer(text, "\n");
if(st.hasMoreTokens())
{
String token = st.nextToken();
while (st.hasMoreTokens()) {
token = st.nextToken();
result = result + token.substring(3) + "\n";
}
}
result = result.substring(0, result.length()-2);
return result;
}
COM: <s> delets starting comments delimiters for every line </s>
|
funcom_train/39009886
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void saveExportPath(String path) {
// Get the LD Entry from the Project Index
//MOD: wegen neuer version auskommentiert (prod error)
// LearningDesignEntry ldEntry = _ldEditor.getLearningDesignDataModel()
// .getLearningDesignEntry();
// ldEntry.setExportPath(path);
//
// // Save
// try {
// ldEntry.getDataModel().save();
// }
// catch(Exception ex) {
// ex.printStackTrace();
// }
}
COM: <s> save the export path to the ld entry file </s>
|
funcom_train/936452
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private URL getURL(final String absoluteFile) {
URL fileURL = null;
File file = new File(absoluteFile);
if (!file.exists()) {
Thread currentThread = Thread.currentThread();
ClassLoader classLoader = currentThread.getContextClassLoader();
fileURL = classLoader.getResource(file.getAbsolutePath());
}
return fileURL;
}
COM: <s> returns the url to the file </s>
|
funcom_train/5573752
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean loadLogFile(URL url) {
boolean ok = false;
try {
LogFileParser lfp = new LogFileParser(url.openStream());
lfp.parse(this);
ok = true;
} catch (IOException e) {
LogFactor5ErrorDialog error = new LogFactor5ErrorDialog(
getBaseFrame(), "Error reading URL:" + url.getFile());
}
return ok;
}
COM: <s> loads a parses a log file running on a server </s>
|
funcom_train/43100375
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void reportError(String message, boolean showUI) {
if (showUI) {
JOptionPane.showMessageDialog(
ProjectBrowser.getInstance(),
message,
"Error",
JOptionPane.ERROR_MESSAGE);
} else {
System.err.print(message);
}
}
COM: <s> open a message dialog with an error message </s>
|
funcom_train/4283986
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addTypeStartPositionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TypedASTNode_typeStartPosition_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TypedASTNode_typeStartPosition_feature", "_UI_TypedASTNode_type"),
UtilitiesPackage.Literals.TYPED_AST_NODE__TYPE_START_POSITION,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the type start position feature </s>
|
funcom_train/12173197
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private SeparatorManager createSeparatorManager() {
// todo Allow the following to be customised.
SeparatorArbitrator groupArbitrator
= UseDeferredSeparatorArbitrator.INSTANCE;
SeparatorArbitrator orientationArbitrator
= HTMLMenuOrientationSeparatorArbitrator.INSTANCE;
SeparatorManager orientationManager = new DefaultSeparatorManager(
outputBuffer, orientationArbitrator);
return new MenuSeparatorManager(outputBuffer,
groupArbitrator,
orientationSeparator,
orientationManager);
}
COM: <s> create the separator manager for handling separators between groups </s>
|
funcom_train/46738233
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setSettingsFormId(Long settingsFormId) {
if (!(this.settingsFormId.longValue() == settingsFormId.longValue())) {
Long oldsettingsFormId= 0L;
oldsettingsFormId = this.settingsFormId.longValue();
this.settingsFormId = settingsFormId.longValue();
setModified("settingsFormId");
firePropertyChange(String.valueOf(USERGROUPS_SETTINGSFORMID), oldsettingsFormId, settingsFormId);
}
}
COM: <s> settings for group </s>
|
funcom_train/31874498
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected JMenu createFontStyleMenu() {
CommandMenu menu = new CommandMenu("Font Style", this.editor);
menu.add( new ChangeAttributeCommand(
"Plain", "FontStyle", new Integer(Font.PLAIN), this.editor));
menu.add (new ChangeAttributeCommand(
"Italic", "FontStyle", new Integer(Font.ITALIC), this.editor));
menu.add (new ChangeAttributeCommand(
"Bold", "FontStyle", new Integer(Font.BOLD), this.editor));
return menu;
}
COM: <s> creates the font style menu with entries plain italic bold </s>
|
funcom_train/45117324
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void commitCurrentScenario() {
if (!verifyEnabled()) {
return;
}
Scenario scenario = ScenariosManager.getInstance().getCurrentScenario();
try {
sourceControl.commitScenario(scenario);
} catch (SourceControlException e) {
log.log(Level.WARNING, "Failed to commit scenario", e);
e.printStackTrace();
JOptionPane.showConfirmDialog(TestRunner.treeView,
"Failed to commit scenario", "Source Control Failure",
JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
}
updateScenarioStatus(scenario);
}
COM: <s> commit current root scenarios and all sub scenarios to the repository </s>
|
funcom_train/43890277
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private RenderedOp bicubic(RenderedOp src) {
// using filtered subsample operator to do a subsampling
final ParameterBlockJAI pb = new ParameterBlockJAI("filteredsubsample");
pb.addSource(src);
pb.setParameter("scaleX", new Integer(downsampleStep));
pb.setParameter("scaleY", new Integer(downsampleStep));
pb.setParameter("qsFilterArray", new float[] { 1.0f });
pb.setParameter("Interpolation", new InterpolationBicubic(2));
return JAI.create("filteredsubsample", pb);
}
COM: <s> performs a bicubic interpolation on the provided image </s>
|
funcom_train/951440
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean entryMade() {
String customerID = customerIDTextField.getText().trim();
String password = passwordTextField.getText();
String firstName = firstNameTextField.getText().trim();
String lastName = lastNameTextField.getText().trim();
try {
database.createUser(customerID, firstName, lastName, password);
return true;
} catch (Exception e) {
System.err.println(e.toString());
return false;
}
}
COM: <s> tries to make an entry into the corresponding database </s>
|
funcom_train/18956416
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Element resolve(String uri) {
if (LOGGER.isDebugEnabled()) {
addDebugInfo(uri, "JAVA method invocation");
}
try {
/**
* rethrow Exception as RuntimException TODO: need to refactor this
* and declare throw in method signature
*/
return resolveURI(uri);
} catch (Exception e) {
throw new MCRException("Error while resolving: " + uri, e);
}
}
COM: <s> reads xml from uris of various type </s>
|
funcom_train/25946371
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public EJBLocalHome getLocalHome(String jndiHomeName) throws ServiceLocatorException {
EJBLocalHome home = null;
try {
home = (EJBLocalHome) ic.lookup(jndiHomeName);
} catch (NamingException ne) {
throw new ServiceLocatorException(ne);
} catch (Exception e) {
throw new ServiceLocatorException(e);
}
return home;
}
COM: <s> will get the ejb local home factory </s>
|
funcom_train/18315252
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString()
{
String s = null;
try
{
java.util.Date date = new java.util.Date( getTime() );
s = new java.text.SimpleDateFormat( getDefaultTimeFormat() ).format( date );
}
catch( Exception exc )
{
FrameworkBaseObject.printTheMessage( "FrameworkTimestamp.toString() failed - " + exc );
}
return( s );
COM: <s> string representation using the internal default time format </s>
|
funcom_train/9368822
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if (DBG) Log.d(LOG_TAG, "onItemSelected() position " + position);
// A suggestion has been selected, rewrite the query if possible,
// otherwise the restore the original query.
if (REWRITE_QUERIES) {
rewriteQueryFromSuggestion(position);
}
}
COM: <s> implements on item selected listener </s>
|
funcom_train/34141954
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void ttsSpeak(String text, int queueMode, HashMap<String, String> params) {
if (mTts != null) {
mTts.speak(text, queueMode, params);
} else if (mTtsExtended != null) {
mTtsExtended.speak(text, queueMode, params);
}
}
COM: <s> abstraction that calls speak on either tts or tts extended </s>
|
funcom_train/31166759
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getParentModule(String module, String id) {
Map moduleData = (Map) modules.get(module);
Map externalModules = (Map) moduleData.get(IMPORT_SET);
String result = null;
String aModule;
for (Iterator it = externalModules.keySet().iterator(); it.hasNext(); ) {
aModule = (String) it.next();
List externalReferences = (List) externalModules.get(aModule);
if (externalReferences.contains(id)) {
result = aModule;
break;
}
}
return result;
}
COM: <s> returns the name of the module exporting a designated reference in the </s>
|
funcom_train/20396305
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void processCachedMessages(HttpServletRequest request, HttpServletResponse response) {
super.processCachedMessages(request, response);
if (removeAccessedSessionErrors) {
HttpSession session = request.getSession(false);
if (session == null)
return;
ActionMessages messages = (ActionMessages) session.getAttribute(Globals.ERROR_KEY);
if (messages == null)
return;
if (messages.isAccessed()) {
session.removeAttribute(Globals.ERROR_KEY);
}
}
}
COM: <s> process cached error messages if remove accessed session errors is true </s>
|
funcom_train/13255813
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int compareTo(Object o) {
Caption c = (Caption) o;
// Compares y values and if they are equals, compares x
if (y < c.y) {
return -1;
} else if (y > c.y) {
return 1;
} else {
if (x < c.x) {
return -1;
} else if (x > c.x) {
return 1;
} else {
return 0;
}
}
}
COM: <s> p compares this object with the specified object for order </s>
|
funcom_train/37190505
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void updateDatabases(Object[] databaseList, String databaseName) {
if(cbDatabases != null) {
fromCode = true;
cbDatabases.removeAllItems();
for(int i = 0; i < databaseList.length; i++) {
cbDatabases.addItem(databaseList[i]);
}
if(databaseName != null) cbDatabases.setSelectedItem(databaseName);
fromCode = false;
updateSchemas(serverAccess.getSchemaList(), null);
}
}
COM: <s> updates the current databases listed in the jcombo box </s>
|
funcom_train/538759
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected NumberFormat getCurrencyFormat() {
if (currencyFormat == null) {
currencyFormat = NumberFormat.getCurrencyInstance();
if (getCurrencyNameSpace().equals(GnucashAccount.CURRENCYNAMESPACE_CURRENCY)) {
currencyFormat.setCurrency(Currency.getInstance(getCurrencyID()));
} else {
currencyFormat = NumberFormat.getInstance();
}
}
return currencyFormat;
}
COM: <s> the currency format to use if no locale is given </s>
|
funcom_train/50248190
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void run(IAction action) {
IStructuredSelection sel = (IStructuredSelection) myView.getSite().getPage().getSelection();
IProject proj = (IProject) sel.getFirstElement();
try {
action.setEnabled(false);
if (action.getId().endsWith("DePythonize")) {
PythonPlugin.removePythonNature(proj, null);
} else {
PythonPlugin.addPythonNature(proj, null);
}
} catch (CoreException e) {
}
}
COM: <s> adds the python nature to the selected project </s>
|
funcom_train/32982211
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void receiveSignal(TransmissionPacket antennaSignal) {
synchronized(_receivers) {
for(Iterator i = _receivers.iterator(); i.hasNext(); ) {
AbstractReceiver r = (AbstractReceiver)i.next();
antennaSignal = (TransmissionPacket)antennaSignal.clone();
GeoPosition otherPos = antennaSignal.getPosition();
int distance = GeoPosition.computeDistance(otherPos, _position);
Decibel attenuation = PropagationModel.computeAttenuation(distance);
antennaSignal.amplify(attenuation);
r.receiveSignal(antennaSignal);
}
}
}
COM: <s> process the signal coming via the airwave </s>
|
funcom_train/12547644
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void addProductions(Collection productions) {
Iterator it = productions.iterator();
if (!it.hasNext())
return;
GrammarTableModel model = table.getGrammarModel();
int min = 1000000000, max = 0;
while (it.hasNext()) {
Production p = (Production) it.next();
int row = model.addProduction(p);
min = Math.min(min, row);
max = Math.max(max, row);
}
table.setRowSelectionInterval(min, max);
}
COM: <s> adds productions to the grammar pane and makes them selected </s>
|
funcom_train/13914124
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetRemoteHost() {
System.out.println("getRemoteHost");
ProxymaFacade proxyma = new ProxymaFacade();
ProxymaContext context = proxyma.getContextByName("default");
ProxymaServletRequest instance = new ProxymaServletRequest(request, context);
String expResult = request.getRemoteHost();
String result = instance.getRemoteHost();
assertEquals(expResult, result);
}
COM: <s> test of get remote host method of class proxyma servlet request </s>
|
funcom_train/27710053
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void remove(int offs, int len) throws BadLocationException {
boolean error = false;
if (offs == 0 && len > 0 && len < getLength())
if (Character.isDigit(getText(len, 1).charAt(0)))
error = true;
if (error)
Toolkit.getDefaultToolkit().beep();
else
super.remove(offs, len);
}
COM: <s> attempts to remove a portion of the document </s>
|
funcom_train/24000725
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testDoBind() {
CollectionLiteralAst instance = new CollectionLiteralAst(-1, TokenFactory.createToken(-1), "Bag");
assertEquals("Bag< OCLAny >",instance.doBind(new BindContext()).getPathName());
}
COM: <s> test of do bind method of class collection literal ast </s>
|
funcom_train/4754470
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void storeStep(StepInterpolator interpolator, double t) {
lastTime = t;
interpolator.setInterpolatedTime(lastTime);
System.arraycopy(interpolator.getInterpolatedState(), 0,
lastState, 0, lastState.length);
System.arraycopy(interpolator.getInterpolatedDerivatives(), 0,
lastDerivatives, 0, lastDerivatives.length);
}
COM: <s> stores the interpolated information for the given time in the current </s>
|
funcom_train/5673928
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Expression readPositionExpression() throws HsqlException {
read();
readThis(Token.OPEN);
Function f = new Function(Token.T_POSITION,
"org.hsqldb.Library.position", false);
f.setArgument(0, readTerm());
readThis(Token.IN);
f.setArgument(1, readOr());
readThis(Token.CLOSE);
return f;
}
COM: <s> reads a position expression </s>
|
funcom_train/24285206
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JTextField getEmailTextField() {
if (emailTextField == null) {
emailTextField = new JTextField();
emailTextField.setText(RESTClient.defaultInstance().getProperties().getProperty("email"));
emailTextField.setHorizontalAlignment(JTextField.LEFT);
emailTextField.setPreferredSize(new Dimension(200, 20));
}
return emailTextField;
}
COM: <s> this method initializes email text field </s>
|
funcom_train/10584561
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public DocumentLocator getDescendant(String relativePath) {
if (relativePath.length() == 0) {
throw new IllegalArgumentException("The relative path must not be empty!");
}
if (relativePath.startsWith("/")) {
throw new IllegalArgumentException("The relative path must not start with a slash!");
}
return getPathVersion(getPath() + "/" + relativePath);
}
COM: <s> returns a descendant of this locator </s>
|
funcom_train/42135263
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: // public void setStartTime(long startTime) throws MalformedURLException {
// Model model = db.getJenaModel();
// Resource node = model.createResource(uri);
// Property sessionStart = model.createProperty(Session.START_TIME);
// node.addProperty(sessionStart, startTime);
// db.jenaReplace(model, username, password);
// this.startTime = startTime;
// }
COM: <s> sets the start time of the session </s>
|
funcom_train/35082338
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Context initJNDI(boolean useProps, String jndi, String url, boolean useAuth, String user, String pwd) {
if (useProps) {
try {
return new InitialContext();
} catch (NamingException e) {
log.error(e.getMessage());
return null;
}
} else {
return InitialContextFactory.lookupContext(jndi, url, useAuth, user, pwd);
}
}
COM: <s> initialize the jndi intial context </s>
|
funcom_train/18807374
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void datasetChanged(DatasetChangeEvent event) {
if (this.radiusAxis != null) {
this.radiusAxis.configure();
}
if (getParent() != null) {
getParent().datasetChanged(event);
}
else {
PlotChangeEvent e = new PlotChangeEvent(this);
notifyListeners(e);
}
}
COM: <s> receives notification of a change to the plots m dataset </s>
|
funcom_train/9736995
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String getStatus () {
StringBuffer retBuf = new StringBuffer("Shortest path found for ");
java.util.Iterator it = this.labeledNodeList.entrySet().iterator();
java.util.Map.Entry entry;
while (it.hasNext()) {
entry = (java.util.Map.Entry) it.next();
Node nodeObj = (Node) entry.getValue();
retBuf.append(nodeObj.toString()).append(",");
}
return retBuf.substring(0, retBuf.length()-1);
}
COM: <s> returns a string that contains the status of last algorithm execution </s>
|
funcom_train/34355901
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void delete(Pipeline existingPipeline, Credentials credentials) throws DatabaseAccessException, PermissionDeniedException, IllegalStateException {
validateModifyPermission(existingPipeline, credentials);
if (!canDelete(existingPipeline)) {
throw new IllegalStateException("The pipeline is not in the state that allows pipeline removal (pipeline must be in not running state)");
}
db.removePipeline(existingPipeline);
}
COM: <s> deletes the pipeline </s>
|
funcom_train/34529414
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean containsProject(String projectPath) {
boolean found = false;
try {
File file = new File(projectPath);
File[] files = file.listFiles();
for (int i = 0; (i < files.length) && !found; i++) {
found = files[i].getName().equals(AbstractProjectMgr.PROJECT_FILE);
if ( ! found ) {
found = files[i].getName().equals(AbstractProjectMgr.PROJECT_FILE_OLD);
}
}
} catch(Exception ex) {}
return found;
}
COM: <s> indicates whether the specified path contains an inforama project </s>
|
funcom_train/37449733
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void mergeIndexes( Directory[] dir ) {
synchronized ( mutex ) {
final IndexWriter writer;
try {
writer = new IndexWriter( index, analyzer, false );
writer.mergeFactor = 100;
writer.addIndexes( dir );
writer.optimize();
writer.close();
} catch ( IOException e ) {
new RuntimeException( "Problems merging the Indexes", e );
}
}
}
COM: <s> this method was used with the indexing using threads </s>
|
funcom_train/34222105
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected VertexView createVertexView(Object cell) {
if (cell instanceof FastCircleCell) {
return new FastCircleView(cell);
}
if(cell instanceof Circle){
return new CircleView(cell);
}
if(cell instanceof Ellipse){
return new EllipseView(cell);
}
if(cell instanceof Polygon3){
return new Polygon3View(cell);
}
if(cell instanceof Rectangle){
return new RectangleView(cell);
}
if(cell instanceof RoundRectangle){
return new RoundRectangleView(cell);
}
if(cell instanceof DiscreteCell){
return new DiscreteView(cell);
}
else {
return new FastVertexView(cell);
}
}
COM: <s> constructs a vertex view view for the specified object </s>
|
funcom_train/12923767
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void orderABGR(final byte[] img) {
byte swap;
for (int i = 0; i < img.length; i += RGBA_CHANNELS) {
swap = img[i + ALPHA];
img[i + ALPHA] = img[i + RED];
img[i + RED] = swap;
swap = img[i + BLUE];
img[i + BLUE] = img[i + GREEN];
img[i + GREEN] = swap;
}
}
COM: <s> reorder the image pixels from rgba to abgr </s>
|
funcom_train/26475170
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addChild(ViewModel part) {
if (this.childs == null)
this.childs = new ArrayList();
if (part.name == null)
throw new RuntimeException(
"No name is defined for the viewmodel \""
+ part.toString()
+ "\"!");
if (this.getChild(part.name) != null)
throw new RuntimeException(
"There is already a view model named '"
+ part.name
+ "' defined in '"
+ this.getFullName()
+ "'");
this.childs.add(part);
part.setParent(this);
}
COM: <s> add a child to this view model </s>
|
funcom_train/43920355
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected BookmarkablePageLink buildPageLink(BookmarkablePageInfo pageInfo) {
BookmarkablePageLink link = new BookmarkablePageLink("link", pageInfo
.getPageClass());
link.add(new AttributeModifier("title", new Model(pageInfo
.getLinkTooltip())));
link.add(new Label("linkText", new Model(pageInfo.getLinkName())));
link.setAutoEnable(true);
return link;
}
COM: <s> builds a standard page link given a bookmarkable page info object </s>
|
funcom_train/23269206
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void writeSOAPBody(final NSTransformerHandler soapHandler) throws SAXException {
soapHandler.startElement("Body");
try {
writeSOAPBodyContent(soapHandler);
} catch (SAXException saxe) {
if (!(saxe.getCause() instanceof IOException)) soapHandler.endElement("Body");
throw saxe;
}
soapHandler.endElement("Body");
return;
}
COM: <s> write the soap quot body quot element </s>
|
funcom_train/4978327
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(Object o) {
if (!(o instanceof AgentContext)) {
return false;
}
AgentContext other = (AgentContext)o;
if (this.context.equals(other.getContext())
&& this.agent.equals(other.getAgent())) {
return true;
}
return false;
}
COM: <s> return true if both agent and context are equal </s>
|
funcom_train/36696462
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String calcSha1(String s){
try {
MessageDigest md = MessageDigest.getInstance("SHA-1");
byte[] a = md.digest(s.getBytes());
String ret = new String();
for(int i=0; i<a.length; i++){
String temp = Integer.toHexString((int) a[i]);
if(temp.length() <= 1)
ret = ret.concat("0".concat(temp));
else
ret = ret.concat(temp.substring(temp.length() - 2));
}
return ret;
}
catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return new String();
}
COM: <s> returns a hex string of the sha 1 hash of the string provided </s>
|
funcom_train/3820435
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean canRemove(User user) {
SecurityContext sctx = cat.getProject().getSecurityContext();
// 2. Check permissions
try {
sctx.check(user, sctx.getDeleteContentPermission(ctype));
sctx.check(user, sctx.getModifyCategoryPermission(cat));
return true;
} catch (SCMException ex) {
return false;
}
}
COM: <s> check remove permissions for this content </s>
|
funcom_train/43600898
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void prepare() {
if (getRequest().getMethod().equalsIgnoreCase("post")) {
// prevent failures on new
String pipeLineId = getRequest().getParameter("pipeLine.id");
if (pipeLineId != null && !pipeLineId.equals("")) {
pipeLine = pipeLineManager.get(new Long(pipeLineId));
}
}
}
COM: <s> grab the entity from the database before populating with request parameters </s>
|
funcom_train/21867075
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void initAndShowMainFrame() {
Logger.log(OpenTaxi.class, "initAndShowMainFrame() - Creating main "
+ "form frame.");
JFrame theFrame = new JFrame();
MainFormWrapper theMFW = new MainFormWrapper();
theFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
theFrame.getContentPane().add(theMFW.getForm());
theFrame.pack();
theFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);
theFrame.setVisible(true);
}
COM: <s> creates and initialize frame with main form </s>
|
funcom_train/24187221
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void reset (String agentName, Map<String, String> owners, Map<String, V[]> domains, List< ? extends UtilitySolutionSpace<V, U> > spaces, boolean maximize) {
this.agentName = agentName;
this.owners = owners;
this.domains = domains;
this.spaces = new ArrayList< UtilitySolutionSpace<V, U> > (spaces);
this.maximize = maximize;
}
COM: <s> resets the problem </s>
|
funcom_train/24535071
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected String argsToString(int[] constraints) {
StringBuffer sb = new StringBuffer() ;
for (int i=0; i<constraints.length; i++) {
if (i>0) sb.append(", ") ; //$NON-NLS-1$
sb.append(Integer.toString(constraints[i])) ;
}
return sb.toString() ;
}
COM: <s> create initialization arguments </s>
|
funcom_train/3831587
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String formatPropertyName( String property ) {
Debug.debugMethodBegin( this, "formatPropertyName" );
property = property.replace( '/', '.' );
property = property.replace( '@', '.' );
Debug.debugMethodEnd();
return StringExtend.validateString( property, "." );
}
COM: <s> the method formats a slash seperated property name like cities id </s>
|
funcom_train/18875563
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void editPressed() {
setPresentsDefaultValue(false);
int index = list.getSelectionIndex();
if (index >= 0) {
String input = getNewInputObject(Messages.ProjectionFieldEditor_changeParameter, list.getItem(index));
if (input != null) {
list.setItem(index, input);
selectionChanged();
}
}
}
COM: <s> notifies that the edit button has been pressed </s>
|
funcom_train/10615624
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetMinCRL() {
X509CRLSelector selector = new X509CRLSelector();
assertNull("Initially the minCRL should be null.",
selector.getMinCRL());
BigInteger minCRL = new BigInteger("10000");
selector.setMinCRLNumber(minCRL);
assertTrue("The result should be equal to specified.",
minCRL.equals(selector.getMinCRL()));
}
COM: <s> get min crl method testing </s>
|
funcom_train/180050
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public XMLElement getXMLElement(String fileName){
XMLElement ans=null;
try {
Document document = parser.parse(fileName);
ans=getXMLElement(document);
}
catch (SAXParseException e) {
// ignore
}
catch (Exception e) {
System.err.println("error: Parse error occurred - "+e.getMessage());
if (e instanceof SAXException) {
Exception nested = ((SAXException)e).getException();
if (nested != null) {
e = nested;
}
}
e.printStackTrace(System.err);
}
return ans;
}
COM: <s> creates an xmlelement object from the xml file </s>
|
funcom_train/8399820
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String next(int n) throws ParseException {
int i = this.myIndex;
int j = i + n;
if (j >= this.mySource.length()) {
throw syntaxError("Substring bounds error");
}
this.myIndex += n;
return this.mySource.substring(i, j);
}
COM: <s> get the next n characters </s>
|
funcom_train/16913541
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void changeStimulusDimension(final int num) {
double[] newStim = new double[num];
for (int i = 0; i < num; i++) {
if (i < valArray.length) {
newStim[i] = valArray[i];
} else {
newStim[i] = 0;
}
}
valArray = newStim;
}
COM: <s> changes size of array </s>
|
funcom_train/43432089
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setOrientationByString(String newOrientation) {
for (int i=0;i<possibleOrientations.size();i++) {
ComponentOrientation currentOrientation = possibleOrientations.get(i);
if ((newOrientation == null) || (newOrientation.equals(""))) {
// Look for the default orientation
if (currentOrientation.isDefault()) {
orientation = currentOrientation;
return;
}
} else {
if (currentOrientation.getOrientationId().equals(newOrientation)) {
orientation = currentOrientation;
return;
}
}
}
}
COM: <s> sets a new orientation using the string id associated with it </s>
|
funcom_train/12145209
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void init( ServletConfig config ) throws ServletException {
super.init( config );
this.config = config;
m_Base64 = new Base64();
log("SAMELNLauncher Running");
/*
* String tempdir = config.getServletContext().getRealPath("/") + kTempDir ;
* try {
* File temp = new File(tempdir);
* if (!temp.exists()) {
* temp.mkdir();
* }
* } catch (Exception e) {
* throw new ServletException (e.getMessage());
* }
*/
}
COM: <s> description of the method </s>
|
funcom_train/32870037
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Aspect getExtension() {
try {
if (wrappedExtension == null) {
wrappedExtension = (Aspect) ((MarshalledObject) signedExtension.getObject()).get();
}
return wrappedExtension;
} catch (IOException e) {
Logger.error("SignedAspect.getExtension: io exception", e);
throw new RuntimeException("contained exception " + e);
} catch (ClassNotFoundException e) {
Logger.error("SignedAspect.getExtension: class not found", e);
throw new RuntimeException("contained exception " + e);
}
}
COM: <s> returns wrapped extension without checking it for being signed </s>
|
funcom_train/39048263
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int getElementCount(String str) {
if ((str == null) || (str.length() == 0)) {
return 0;
}
int count = 0;
int pos = -1;
do {
count++;
pos = str.indexOf(':', pos + 1);
} while (pos != -1);
return count;
}
COM: <s> count the number of colon separated elements in the string </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.