__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/17592372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameClass(Map classnames) {
LongVector v = items;
int size = numOfItems;
classes = new HashMap(classes.size() * 2);
for (int i = 1; i < size; ++i) {
ConstInfo ci = v.elementAt(i);
ci.renameClass(this, classnames);
ci.makeHashtable(this);
}
}
COM: <s> replaces all occurrences of class names </s>
|
funcom_train/37517556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean declaresType(/*@non_null@*/ String qualifiedName) {
String nonPackagePart = matchPackageName(qualifiedName);
if (nonPackagePart == null || typeDeclarations == null ||
nonPackagePart.indexOf('/') >= 0) {
return false;
}
for (int i = 0; i < typeDeclarations.length; i++) {
if (typeDeclarations[i].ident().equals(nonPackagePart)) {
return true;
}
}
return false;
}
COM: <s> returns true iff this compilation unit contains a declaration </s>
|
funcom_train/34448741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMetaClassNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObjectChange_metaClassName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObjectChange_metaClassName_feature", "_UI_ObjectChange_type"),
TracesPackage.Literals.OBJECT_CHANGE__META_CLASS_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the meta class name feature </s>
|
funcom_train/3345003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BootSector createBootSector(String stage1Name, String stage2Name) {
if (stage1Name == null) {
stage1Name = "stage1";
}
if (stage2Name == null) {
stage2Name = "stage2";
}
try {
getStage1(stage1Name);
getStage2(stage2Name);
return new GrubBootSector(stage1);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
COM: <s> create the actual bootsector </s>
|
funcom_train/29928430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedNode(TreeDrawerNode n) {
if (selectedNode == n) {
return;
}
/*
if (selectedNode != null)
drawer.paintSubtree(offscreenGraphics,
xScaleEq, yScaleEq,
destRect, selectedNode, false);
selectedNode = n;
if (selectedNode != null)
drawer.paintSubtree(offscreenGraphics,
xScaleEq, yScaleEq,
destRect, selectedNode, true);
*/
selectedNode = n;
offscreenValid = false;
if ((status != null) && hasMouse) {
status.setMessages(getStatus());
}
synchMap();
repaint();
}
COM: <s> set the selected node update the array selection and redraw </s>
|
funcom_train/18460957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertFormula(String soll, String ist) {
try {
assertEquals(soll, ist);
}
catch (ComparisonFailure cof) {
System.err.println("Ist : " + ist);
System.err.println("Soll: " + soll);
//rethrow the exception
assertEquals(soll, ist);
}
}
COM: <s> helper to output extended debug information on failing assertion </s>
|
funcom_train/9978260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editLink(ProjectContext context, NodeLink link, boolean shortView) {
EditInterpackageLinkSettings cpd = new EditInterpackageLinkSettings();
EditLinkListener cll = new EditLinkListener();
cll.link = link;
cll.context = context;
cpd.boolLeftArrow = link.arrowNode1();
cpd.boolRightArrow = link.arrowNode2();
cpd.strLabel = link.getLabel();
cpd.setDialogListener(cll);
cpd.openView(context);
context.setFocus();
}
COM: <s> edit a link </s>
|
funcom_train/14181135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onSubmit() {
BGOSession session = (BGOSession) getSession();
if (session.authenticate(properties.getString("name"), properties
.getString("password"))) {
setResponsePage(new Index(PageParameters.NULL));
} else {
error(getLocalizer().getString("couldNotLogin", page));
}
}
COM: <s> authenticate the user </s>
|
funcom_train/31130461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newSocketServer(DataInputStream inFromNXT, DataOutputStream outToNXT) throws IOException, InterruptedException {
int port = inFromNXT.readInt();
System.out.println("Waiting on " + port);
ServerSocket serverSocket = new ServerSocket(port);
while (true) {
// Wait for command from NXT
byte command = inFromNXT.readByte();
if(command == 1){
Socket sock = serverSocket.accept();
//System.out.println("Accepted");
handleNewConnection(sock, inFromNXT, outToNXT);
}
}
}
COM: <s> creates a new socket server if instructed by the nxt </s>
|
funcom_train/33945638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Parse cleanseRow(Parse dirty) throws Exception {
String tag = dirty.tag.toLowerCase();
if(!tag.startsWith("<tr")) {
throw new Exception("ERROR: Cannot find \"<tr>\" tag in ParseCleanser.cleanseRow()");
}
dirty.parts = cleanseRowRecursively(dirty.parts);
return dirty;
}
COM: <s> cleanse a row of data marked by lttr gt tags </s>
|
funcom_train/49789880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testChangable() throws Exception {
beginAtSitemapThenPageQuery("Home", "user_id=8");
{
String field = getLabelIDForText("name");
assertLabeledFieldEquals(field, "User Four");
// change it
setLabeledFormElementField(field, "a changed value");
assertLabeledFieldEquals(field, "a changed value");
}
// reload
beginAtSitemapThenPageQuery("Home", "user_id=8");
// hasn't changed
{
String field = getLabelIDForText("name");
assertLabeledFieldEquals(field, "User Four");
}
}
COM: <s> we can select a user edit the fields and reload </s>
|
funcom_train/12188596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSerialization() throws Exception {
Object o = checkIdentity(CookieVersion.getCookieVersion(0));
assertNotNull("name should not be null", ((CookieVersion)o).getName());
CookieVersion cv0 = CookieVersion.NETSCAPE;
CookieVersion cv1 = CookieVersion.RFC2109;
checkIdentity(cv0);
checkIdentity(cv1);
}
COM: <s> make sure that the cookie version class is properly serializable </s>
|
funcom_train/37649907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tree buildRuleTreeViewer(Composite parent) {
buildTreeViewer(parent);
final Tree ruleTree = treeViewer.getTree();
// ruleListMenu = createMenuFor(ruleTree);
// ruleTree.setMenu(ruleListMenu);
// ruleTree.addListener(SWT.MenuDetect, new Listener () {
// public void handleEvent (Event event) {
// popupRuleSelectionMenu(event);
// }
// });
addIssueStyler(treeViewer.getTree());
treeViewer.setCheckStateProvider(createCheckStateProvider());
return ruleTree;
}
COM: <s> build rule table viewer </s>
|
funcom_train/12117058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createOutputPipe(PipeAdvertisement pipeadv) {
// Creating an output pipe
try {
PipeService MyPipeService = netPeerGroup.getPipeService();
// outputPipeEvent() is called once the pipe has resolved
MyPipeService.createOutputPipe(pipeadv, this);
} catch (IOException e) {
NetworkLog.logMsg(NetworkLog.LOG_FATAL, this,
"OutputPipe creation failure");
}
}
COM: <s> method used to create the output pipe needed to send messages </s>
|
funcom_train/20078144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUpdateTrackRatingCountQuery(String trackId) {
return "for $track in //track[@id='" + trackId + "'] " +
" let $newRating := fn:number($track/rating-count) + 1" +
" return " +
" update replace $track/rating-count with " +
" element { \"rating-count\" }{ $newRating }";
}
COM: <s> update track rating count command </s>
|
funcom_train/49790670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHomeChange() throws Exception {
beginAtSitemapThenPage("Home");
{
String target = getLabelIDForText("source target");
assertLabeledFieldEquals(target, "initial value");
}
{
String target = getLabelIDForText("change target");
assertLabeledFieldEquals(target, ""); // empty
setLabeledFormElementField(target, "new value");
}
// it should change 'target'
{
String target = getLabelIDForText("source target");
assertLabeledFieldEquals(target, "new value"); // empty
}
}
COM: <s> change target is told to set target </s>
|
funcom_train/46761456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReportTypeModel getReportType(final long reportTypeId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return ReportsData.getReportType(reportTypeId, chain, call);
}}; return (ReportTypeModel) call(method, call);
}
COM: <s> same transaction return the single report type model for the primary key </s>
|
funcom_train/892364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStringValue(Object obj, String pattern) {
try {
Field field = new Field();
field.setTypeByObject(obj);
TextFormatter f = new TextFormatter(field, locale, pattern, obj);
return f.getFormattedFieldValue();
} catch (Exception e) {
logCat.error(e);
return e.getMessage();
}
}
COM: <s> returns a formatted string with the same formatting as used inside </s>
|
funcom_train/42644792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHighlightsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EmbryoText_highlights_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EmbryoText_highlights_feature", "_UI_EmbryoText_type"),
EmbryomodelPackage.Literals.EMBRYO_TEXT__HIGHLIGHTS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the highlights feature </s>
|
funcom_train/40701744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRegularBehavior() {
AdminCommand command = new AdminCommand("", "");
command.setGetDirectory(true);
assertTrue(command.getGetDirectory());
feed = new UserFeed();
filterResult = true;
assertEquals(GetDirectoryResponse.class, handler.apply(command).getClass());
}
COM: <s> tests for the case that everything goes well </s>
|
funcom_train/14652752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConditionChunk(Chunk chunk) {
this.setChunkType(chunk.getChunkType());
Slot[] slots = chunk.getSlots();
for (Slot slot : slots) {
// this.addSlot(slot);
this.setSlotData(slot.getName(), slot.getData());
}
}
COM: <s> fills the normcondition chunk this class with data </s>
|
funcom_train/37826688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addASong(Song aSong) throws TechnicalException{
if(aSong == null)
throw new TechnicalException(this.getClass().getName(),"Impossible to add a null Song");
else
songs.put(aSong.getUniqueId(), aSong);
}
COM: <s> add a song to this album </s>
|
funcom_train/39563922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLeafCount() {
int count = 0;
SyntaxTreeNode node;
Enumeration enum1 = breadthFirstEnumeration(); // order matters not
while (enum1.hasMoreElements()) {
node = (SyntaxTreeNode)enum1.nextElement();
if (node.isLeaf()) {
count++;
}
}
if (count < 1) {
throw new Error("tree has zero leaves");
}
return count;
}
COM: <s> returns the total number of leaves that are descendants of this node </s>
|
funcom_train/33849256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read() {
File prefFile = new File(SystemProperties.getProperty("user.home"), PREF_FILE_NAME);
if (!prefFile.exists() || !prefFile.isFile()) {
return;
}
try {
read(new FileInputStream(prefFile));
} catch (IOException e) {
// Ignore - just use default preferences
}
}
COM: <s> read persistent global user preferences from file in the users home </s>
|
funcom_train/45118397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
TreePath treePath = testTableController.getTree().getSelectionPath();
if (treePath == null || treePath.getLastPathComponent() == null) {
return;
}
node = (ScenarioTreeNode) treePath.getLastPathComponent();
if (testTableController.getTabbes().getSelectedIndex() == 2) {
setCurrentTest(node.getTest(), false, true);
}
}
COM: <s> implementation of change listener </s>
|
funcom_train/44304454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean existsSchemaValue(MtColumn col) throws MelbaException {
for (int i = 0; i < lst.size(); i++) {
SchemaValue val = (SchemaValue) lst.get(i);
if (col.isCorrespondingTo(val.getSchemaColumn()))
return true;
}
return false;
}
COM: <s> return true if a code schema value code is corresponding to the </s>
|
funcom_train/17915683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExecutionHistory(String project, String type, String name, Date after, Date before, String status) throws AxisFault {
try {
StringWriter buffer = new StringWriter();
CSVWriter writer = new CSVWriter(buffer);
writer.write(Persistence.getInstance().queryExecutions(project, type, name, after, before, status));
return buffer.toString();
}
catch (Exception e) {
throw new AxisFault("Failed to execute method getExecutionHistory for project "+project+": "+e.getMessage());
}
}
COM: <s> gets the filtered histories of finished executions in csv format </s>
|
funcom_train/38324801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate(Fact left, int leftId, Fact right, int rightId, int opr){
if (opr == Constants.NOTEQUAL) {
return Evaluate.evaluateNotEqual(left.getSlotValue(leftId),
right.getSlotValue(rightId));
} else {
return Evaluate.evaluateEqual(left.getSlotValue(leftId),
right.getSlotValue(rightId));
}
}
COM: <s> method will evaluate a single slot from the left against the right </s>
|
funcom_train/19816995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setData(String first, String last) {
int resultado=0;
String query = "INSERT INTO test (first, last) VALUES ('"+first+"','"+last+"')";
try {
Connection connection = getConn();
Statement select = connection.createStatement();
ResultSet result = select.executeQuery(query);
//rsSize = getResultSetSize(result); // size the array
// clean up
result.close();
connection.close();
} catch (Exception e) {
System.err.println("Mysql Statement Error: " + query);
e.printStackTrace();
resultado = -1;
}
return resultado;
}
COM: <s> get how many chapters are in a book </s>
|
funcom_train/964929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent buildContentPane() {
JPanel panel = new JPanel(new BorderLayout());
panel.add(buildToolBar(), BorderLayout.NORTH);
panel.add(buildSplitPane(), BorderLayout.CENTER);
panel.add(buildStatusBar(), BorderLayout.SOUTH);
return panel;
}
COM: <s> builds and answers the content pane </s>
|
funcom_train/4308647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateNewsItem(NewsItem item, String rsName) throws RecordStoreFullException, RecordStoreException {
RecordStore rs = RecordStore.openRecordStore(rsName, false);
byte[] row = item.getBytes();
rs.setRecord(item.getRs_id(), row, 0, row.length);
rs.closeRecordStore();
}
COM: <s> updates the given news item </s>
|
funcom_train/3474225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileDialogWatcher (Environment env, Components components, Record record) {
super(env);
this.components = components;
setRecord (record);
// Setting the event mask
WindowEventMask mask = new WindowEventMask(env, MouseEventMask.ALL_EXCLUDED);
mask.setIncluded (WindowEvent.WINDOW_ACTIVATED, true);
mask.setIncluded (WindowEvent.WINDOW_DEACTIVATED, true);
setAWTEventMask (mask);
}
COM: <s> creates a new file dialog watcher object </s>
|
funcom_train/15400162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DICOMAnnotation createGeomAnnotation() {
return(new DICOMEllipseAnnotation(1, (Point2D)_points.get(0), (Point2D)_points.get(1), (Point2D)_points.get(2), (Point2D)_points.get(3)));
}
COM: <s> creates new generic elliptical geometric annotation </s>
|
funcom_train/34404031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void componentsForInvitation() {
composeMessageLayout.removeComponent("errorMessage");
composeMessageLayout.removeComponent(lbBulltinTile);
composeMessageLayout.removeComponent(selTargetAudience);
composeMessageLayout.removeComponent(lbTargetAudience);
composeMessageLayout.addComponent(selSendTo, "tfSendTo");
composeMessageLayout.removeComponent(selListSendTo);
composeMessageLayout.removeComponent(btSelectRecipien);
composeMessageLayout.addComponent(btSelectRecipien, "lbListSendTo");
}
COM: <s> components for invitation </s>
|
funcom_train/25638092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildFieldSubHeader(XMLNode node, Content fieldsContentTree) {
if (!currentClass.definesSerializableFields()) {
FieldDoc field = (FieldDoc) currentMember;
fieldWriter.addMemberHeader(field.type().asClassDoc(),
field.type().typeName(), field.type().dimension(), field.name(),
fieldsContentTree);
}
}
COM: <s> build the field sub header </s>
|
funcom_train/36908101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IModelNode selectNextChild() {
IModelNode child;
if (hasNext()) {
child = (IModelNode) next();
previous();
path.push(currentFamily, getCurrentIndex());
currentFamily = child.children();
} else {
throw new IllegalArgumentException("There is no next child to select");
}
setCurrentIndex(-1);
return child;
}
COM: <s> gets next item and then moves cursor down into children </s>
|
funcom_train/2677369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readString() {
int len = 0;
switch (currentDataType) {
case AMF.TYPE_LONG_STRING:
len = buf.getInt();
break;
case AMF.TYPE_STRING:
len = buf.getUnsignedShort();
break;
default:
log.debug("Unknown AMF type: {}", currentDataType);
}
int limit = buf.limit();
final java.nio.ByteBuffer strBuf = buf.buf();
strBuf.limit(strBuf.position() + len);
final String string = AMF.CHARSET.decode(strBuf).toString();
buf.limit(limit); // Reset the limit
return string;
}
COM: <s> reads a string </s>
|
funcom_train/28709057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLocation (String name, String information) {
LocationImpl location = new LocationImpl();
location.setId((int) getNextUid(location));
location.setName(name);
location.setInformation(information);
dataObject.getScreenplay().getLocations().add(location);
setDirty(true);
fireModelChange(new ModelChangedEvent(location, ModelChangedEvent.ADD));
}
COM: <s> adds a new location to the model </s>
|
funcom_train/17848369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showSearchBar() {
if (!mSearchBar.isVisible()) {
mFindPrev.setEnabled(false);
mFindNext.setEnabled(false);
reset();
}
setBlockAutoClosing(true);
// Stop the automatically closing
interrupt();
mSearchBar.setVisible(true);
mSearchCloseBtn.setVisible(true);
getSearchField().requestFocusInWindow();
}
COM: <s> shows the search bar </s>
|
funcom_train/12857754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkSliceArguments(long from, Long to) {
if (from < 0) {
throw new IllegalArgumentException("Slice from is negative: " + from);
}
if (to == null) {
if (from == 0) {
return false;
}
} else if (from > to) {
throw new IllegalArgumentException
("Slice from is more than to: " + from + " > " + to);
}
return true;
}
COM: <s> called by sliced fetch to ensure that arguments are valid </s>
|
funcom_train/12561303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cancelTimer() {
if (aT != null) {
aT.cancel();
aT = null;
scrollType = SCROLL_NONE;
if (visible) {
requestRepaint(0, 0, bounds[W], ARROW_HEIGHT);
requestRepaint(0, bounds[H] - ARROW_HEIGHT, bounds[W], ARROW_HEIGHT);
}
}
}
COM: <s> cancel timer for the arrow repaint </s>
|
funcom_train/25863835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchSettings() throws SQLException {
Cursor cursor = mDb.query(true, SETTINGS_TABLE, new String[] {
KEY_ROWID, KEY_SETTING_TEXT, KEY_SETTING_VALUE }, null, null,
null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
COM: <s> fetches all settings from the database and returns a cursor to the first </s>
|
funcom_train/28347401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(Font fnt) {
table.setFont(fnt);
borderGraph.setTitleFont(fnt);
titleLabel.setFont(fnt);
recordButton.setFont(fnt);
clearButton.setFont(fnt);
freq_cntrlPanel_Spinner.setFont(fnt);
((JSpinner.DefaultEditor) freq_cntrlPanel_Spinner.getEditor()).getTextField().setFont(fnt);
cntrlPanelTime_Label.setFont(fnt);
}
COM: <s> sets the font </s>
|
funcom_train/1147004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeQueueEntry(String queueEntryID) throws QueueBeanException {
try {
queue.removeQueueEntry(queueEntryID);
} catch (QueueEntryException ex) {
throw new QueueBeanException(String.format("Could not remove QueueEntry '%s': %s", queueEntryID, ex.getMessage()), ex);
}
}
COM: <s> removes a queue entry </s>
|
funcom_train/19421812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSqlStatement(String version, String sqlStatement) {
if (version == null) {
version = "nullVersion";
}
EaasyStreet.logDebug("DataAccessBeanFactoryBase(" + className + "): storing SQL; version=" + version + "; SQL=" + sqlStatement);
this.sqlStatement.put(version, sqlStatement);
}
COM: <s> sets the sql statement </s>
|
funcom_train/43244859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLastAccessed() {
System.out.println("getLastAccessed");
Session instance = new Session();
Date expResult = null;
Date result = instance.getLastAccessed();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get last accessed method of class org </s>
|
funcom_train/15624189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureCapacity(final int index) {
if (lineInfo == null) {
lineInfo = new LineInfo[index + 1];
} else if (lineInfo.length <= index) {
final LineInfo[] lineInfoN = new LineInfo[(index + 1) * 2];
System.arraycopy(lineInfo, 0, lineInfoN, 0, lineInfo.length);
lineInfo = lineInfoN;
}
}
COM: <s> ensures that the code line info code array can contain the specified </s>
|
funcom_train/19308973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void def() throws PsOperatorException, PsInterpreterException4a {
final PsObject value = popOperand(PsOperator.DEF);
final PsObject key = popOperand(PsOperator.DEF);
final PsDictionary dict = getInterpreter().getDictionaryStack().peek();
dict.addItem(getInterpreter(), key, value);
}
COM: <s> executes the def operator </s>
|
funcom_train/41767941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void downloadAndAddArtifact(org.apache.maven.artifact.Artifact artifact, long dependencyDepth2) throws MojoFailureException {
this.downloadArtifact(artifact);
this.artifactToCopy.add(artifact);
if (dependencyDepth > 0) {
Set<org.apache.maven.artifact.Artifact> dependencies = getTransitiveDependency(artifact);
getLog().debug("Nummber dependencies : " + dependencies.size());
for (org.apache.maven.artifact.Artifact dependency : dependencies) {
downloadAndAddArtifact(dependency, dependencyDepth2 - 1);
}
}
}
COM: <s> download the artifact when possible and copy it to the target directory </s>
|
funcom_train/9086581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Categories update(Categories entity) {
EntityManagerHelper.log("updating Categories instance", Level.INFO,
null);
try {
Categories result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved categories entity and return it or a copy of </s>
|
funcom_train/10655970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAttributeThreeSameKey() {
AttributeSet as = StyleContextTest.addAttribute(3);
as = sc.addAttribute(as, StyleConstants.Bold, Boolean.FALSE);
assertEquals(3, as.getAttributeCount());
assertTrue(as instanceof SmallAttributeSet);
}
COM: <s> add four attributes into a set but one of them is used twice </s>
|
funcom_train/36466819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Dimension size) {
// create container to display animations
myDisplay = new Canvas(size);
myDisplay.setPreferredSize(size);
myDisplay.setSize(size);
myDisplay.setFocusable(true);
myDisplay.requestFocus();
SettingsPanel settings = new SettingsPanel(myDisplay);
ButtonPanel commands = makeButtonPanel(settings);
setJMenuBar(makeMenuBar());
getContentPane().add(settings, BorderLayout.EAST);
getContentPane().add(commands, BorderLayout.NORTH);
getContentPane().add(myDisplay, BorderLayout.CENTER);
}
COM: <s> initializes the applet called by main </s>
|
funcom_train/39467539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Font getFontFor(final int style) {
switch (style) {
case PLAIN: return getFont().deriveFont(PLAIN);
case BOLD: return getFont().deriveFont(BOLD);
case ITALIC: return getFont().deriveFont(ITALIC);
case BOLD | ITALIC: return getFont().deriveFont(BOLD | ITALIC);
default: return getFont().deriveFont(PLAIN);
}
}
COM: <s> get the font representation of a style </s>
|
funcom_train/3464217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LinkedList parseProjects(String line) {
LinkedList l = new LinkedList();
if(null == line || line.equals("")) { return l; }
int i = line.indexOf(';');
int last = 0;
while(i != -1) {
l.add(line.substring(last, i));
last = i+1;
i = line.indexOf(';', i+1);
}
l.add(line.substring(last));
return l;
}
COM: <s> gets the project types available from a string from the startup class </s>
|
funcom_train/45452872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedPeers(final String[] selectedPeers) {
if (selectedPeers == null) {
this.selectedPeers = null;
return;
}
this.selectedPeers = new String[selectedPeers.length];
for (int i = 0; i < selectedPeers.length; i++) {
this.selectedPeers[i] = selectedPeers[i];
}
}
COM: <s> sets the indices of the selected peers </s>
|
funcom_train/35405868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSize() {
BoardI board = BoardI.newBoard();
assertNotNull(board);
int count = 0;
Iterator<Short> linear = new VertexLineariser(board, (short) 2, (short) 2, (short) 0, false);
while (linear.hasNext()) {
Short s = linear.next();
assertNotNull(s);
count++;
}
int plussize = (board.getSize() + 2) * (board.getSize() + 2);
assertTrue(count + "/" + plussize, count == plussize);
}
COM: <s> test trained model </s>
|
funcom_train/22029165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean testNotEqualsCache(Set set) {
/* WLH 6 Nov 97
if (NotEqualsCache == null || set == null) return false;
for (int i=0; i<CACHE_LENGTH; i++) {
if (set == NotEqualsCache[i]) return true;
}
*/
return false;
}
COM: <s> test set against a cache of set s not equal to this </s>
|
funcom_train/1865138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCollisions(int idx){
SimulatedBall b0=balls[idx];
for (int i = 0; i < balls.length; i++) {
if (i!=idx){
double ct=balls[i].ball.collisionTime(b0.ball);
if (!Double.isNaN(ct)){//if there will be collision
b0.updateCollisionTime(ct,i);
balls[i].updateCollisionTime(ct,idx);
if (ct<nearestCollision){
nearestCollision=ct;
}
}
}
}
}
COM: <s> updates collision times with ball idx </s>
|
funcom_train/4025970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void command_clearmodel(String[] args) {
if( args.length != 1 ) {
throw new IllegalArgumentException();
}
String modelName = args[0];
clearModelHandler(modelName);
System.out.println(String.format("Model '%s' cleaned up.", modelName));
}
COM: <s> command to clear the content of a model </s>
|
funcom_train/39918716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PixelDouble pixelAt(ImageDouble image, int x, int y) {
//PixelDouble pixel = null;
if ((x >= 0) && (x < image.getImageWidth()) &&
(y >= 0) && (y < image.getImageHeight())) {
return image.getPixel(x, y);
} else {
return zeroPixelDouble;
}
}
COM: <s> returns and validates the pixel double at the specified coordinate </s>
|
funcom_train/16174721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveCurrentFile() {
if( currentfile != null ) {
try {
PrintWriter pw = new PrintWriter( currentfile, "UTF-8" );
pw.print( ta.getText() );
pw.close();
} catch( FileNotFoundException e ) {
e.printStackTrace();
} catch( UnsupportedEncodingException e ) {
e.printStackTrace();
}
}
}
COM: <s> saves the xml content to the current file </s>
|
funcom_train/23867599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRelationalExpression(final String column, final RelationalOperator operator, final Object value) {
CDebug.checkParameterNotEmpty(column, "column");
CDebug.checkParameterNotNull(operator, "operator");
if (value != null && (!(value instanceof String) || ((String)value).length() > 0)) {
addExpression(column + operator + createPositionalParameter(value));
}
}
COM: <s> adds a relational expression to this where clause that is created from the </s>
|
funcom_train/32011306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties readPropertiesFile(String filename) {
Properties properties = null;
try {
String rootDir = System.getProperty("eu.more.core.configuration");
if (rootDir == null)
rootDir = "./configuration/";
String fileSep = System.getProperty("file.separator");
String resourceDir = rootDir
+ ((rootDir.endsWith(fileSep)) ? "" : fileSep);
properties = new Properties();
FileInputStream props = new FileInputStream(resourceDir + filename);
properties.load(props);
props.close();
props = null;
} catch (Exception e) {
e.printStackTrace();
}
return properties;
}
COM: <s> reads a properties file from eu </s>
|
funcom_train/22578553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Option findShortOption(Character c) throws InvalidOptionException {
// complain( LOG_DEBUG,"findShortOption: "+c );
for (Iterator<Option> i = options.iterator(); i.hasNext();) {
Option opt = i.next();
if (c.equals(opt.getShortOption())) {
return opt;
}
}
throw new InvalidOptionException("No such option: '-" + c + "'");
}
COM: <s> find the short option using the parameter as a key </s>
|
funcom_train/1443294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void informWorld(Info info) {
if (info == null)
return;
if (info.getInfoType() == Info.TYPE_COACHVI)
this.coachWorld.update((CoachVisualInfo) info);
else if (info.getInfoType() == Info.TYPE_AURAL)
this.coachWorld.update((AuralInfo) info);
else if (info.getInfoType() == Info.TYPE_SPARAM)
this.coachWorld.setSConf(((ServerParamInfo) info).getSConf());
}
COM: <s> this method delegates the updates of the worldmodel by analyzing </s>
|
funcom_train/50849368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUniqueItem(java.awt.List this_list, String this_item) {
boolean flag = false;
for (int i = 0; i < this_list.getItemCount(); i++) {
if (this_list.getItem(i).indexOf(this_item) == 0) {
flag = true;
}
}
if (flag == false) {
this_list.addItem(this_item);
}
}
COM: <s> does not verify that this item is not null </s>
|
funcom_train/4923615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testType_DuplicateMethodName() {
// Record duplicate service method
String errorMessage = "Duplicate GWT Service Async method name 'DuplicateMethodNameAsync.duplicate(...)'. "
+ "Method names must be unique per GWT service interface.";
// Test
this.doTypeTest(DuplicateMethodNameAsync.class.getName(), null,
errorMessage);
}
COM: <s> ensure issue if duplicate method name on async interface </s>
|
funcom_train/11770337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonOK() {
if (jButtonOK == null) {
jButtonOK = new JButton();
jButtonOK.setFont(GuiFont.FONT_PLAIN);
jButtonOK.setText(LanguageManager.getManager().getCurrentLang().cancel());
}
return jButtonOK;
}
COM: <s> this method initializes j button </s>
|
funcom_train/37519317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getHelpString() {
Hashtable helpString = new Hashtable();
helpString.put("help", getOptions().get("help"));
helpString.put("version", getOptions().get("version"));
helpString.put("Xnoversion", getOptions().get("Xnoversion"));
return helpString;
}
COM: <s> returns the help messages </s>
|
funcom_train/33912631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processResponse() {
String departurePattern = StringUtils.getRegexForDate(departureDate);
departureList = extractFlightDetails(
document.getElementById(TigerUtils.ELEMENT_ID_DEPARTURE),
departurePattern);
// String arrivalPattern = StringUtils.getRegexForDate(arrivalDate);
// returnList = extractFlightDetails(
// document.getElementById(TigerUtils.ELEMENT_ID_RETURN),
// arrivalPattern);
}
COM: <s> facade method for extracting flight information </s>
|
funcom_train/46188756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store() {
try {
FileOutputStream fout = new FileOutputStream(blog.getPluginPropertiesFile());
if (fout != null) {
properties.store(fout, "Plugin properties");
fout.flush();
fout.close();
}
} catch (FileNotFoundException fnfe) {
} catch (IOException e) {
log.error(e.getMessage());
}
}
COM: <s> helper method to store the properties to disk </s>
|
funcom_train/38551615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void jarTestNodeSelected(JarTestNode jarTestNode) {
SubSystemTestNode subSystemTestNode;
for(int i = 0; i < jarTestNode.size(); i++ ) {
subSystemTestNode = (SubSystemTestNode)jarTestNode.elementAt(i);
this.subSystemTestNodeSelected(subSystemTestNode);
}
}
COM: <s> called if a jar test node is selected </s>
|
funcom_train/47103813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateWindowBasedOnLandSubtype(){
LandType landType = LandType.values()[cmbLandSubmenu.getSelectedIndex()];
try {
ExitType type = ExitType.values()[cmbLandSubtype.getSelectedIndex()];
if(landType != LandType.EXIT) return;
if(type == ExitType.CITY_GATE)
lblDestRow.setText("Destination Row:");
else lblDestRow.setText("Dungeon Level:");
} catch(Exception ex) {}
}
COM: <s> updates the labels based on thel and subtype selection </s>
|
funcom_train/38828549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Text toText() {
final int dimension = 3;
TextBuilder tmp = TextBuilder.newInstance();
if (this.isApproxEqual(IDENTITY))
tmp.append("{IDENTITY}");
else {
tmp.append('{');
for (int i = 0; i < dimension; i++) {
tmp.append(get(i));
tmp.append(", ");
}
tmp.append(_order);
tmp.append('}');
}
Text txt = tmp.toText();
TextBuilder.recycle(tmp);
return txt;
}
COM: <s> returns the text representation of this set of euler angles </s>
|
funcom_train/36247755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Image lookupAmi(String amiId) {
Ec2ClientFactory clientFactory = new Ec2ClientFactory();
AmazonEC2 client = clientFactory.getAwsClient();
try {
DescribeImagesRequest request = new DescribeImagesRequest();
request.withImageIds(amiId);
DescribeImagesResult result = client.describeImages(request);
if (result.getImages().isEmpty()) {
return null;
}
return result.getImages().get(0);
} catch (AmazonClientException e) {
e.printStackTrace();
}
return null;
}
COM: <s> queries amazon ec2 to look up the specified ami </s>
|
funcom_train/18860210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FormBeansType createAndAddFormBeans(StrutsConfigType strutsConfig) {
FormBeansType formBeans = StrutsConfigFactory.eINSTANCE
.createFormBeansType();
Command cmd = AddCommand.create(getEditingDomain(), strutsConfig,
StrutsConfigPackage.eINSTANCE.getStrutsConfigType_FormBeans(),
formBeans);
if (cmd.canExecute()) {
getEditingDomain().getCommandStack().execute(cmd);
return formBeans;
}
return null;
}
COM: <s> creates the struts config form beans element and adds it to the given </s>
|
funcom_train/50167646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFieldValue(Element element) {
Node fieldChild = element.getFirstChild();
if (fieldChild == null) {
return null;
} //end if ()
if (fieldChild.getNodeType() == Node.TEXT_NODE) {
Text text = (Text) fieldChild;
String data = text.getData();
data = data.trim();
return data;
}
return PedroResources.EMPTY_STRING;
}
COM: <s> convenience routine for extracting the text value for an element </s>
|
funcom_train/19686212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addGateway(String gw, String id){
boolean nothere=true;
//check whether the new gateway is already there, if yes update id, else add it to list.
for(int counter=0;counter<gateways.size();counter++){
Gateway n=(Gateway)gateways.elementAt(counter);
String IP=n.getIa();
int present=IP.compareTo(gw);
if(present==0){
if(n.getId()!=id)
n.setId(id);
nothere=false;
counter=gateways.size()+1;
}
}
if(nothere){
Gateway nadd=new Gateway(gw,id);
gateways.add(nadd);
}
return gateways.size();
}
COM: <s> add a new gateway to the list of gateways </s>
|
funcom_train/28899812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hookTreeSelection() {
viewer.getTree().addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(
org.eclipse.swt.events.SelectionEvent e) {
ui.selectDefault(RoutingView.this, getSelection());
ui.setEditDelegate(RoutingView.this);
}
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
ui.select(RoutingView.this, getSelection());
ui.setEditDelegate(RoutingView.this);
}
});
}
COM: <s> adds a selection listener to the tree </s>
|
funcom_train/2948693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean insert(Connection conn) throws ArtException {
boolean success = false;
int newQueryId = allocateNewId(conn);
if (newQueryId != -1) {
setQueryId(newQueryId);
if (updateHeader(conn) && updateSource(conn)) {
success = true;
} else {
logger.warn("Problem with insert. Either updateHeader or updateSource failed.");
}
}
return success;
}
COM: <s> insert a new query both header and source </s>
|
funcom_train/25491965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TexIdx read() throws IOException {
// a texture index consists of 12 byte of data
byte[] data = new byte[12];
int readBytes = inputStream.read(data);
if (readBytes == -1) {
return null;
}
if (readBytes != 12) {
throw new IOException(
"Cannot read data block from file, not enough bytes available");
}
TexIdx idx = getTexIdx(data);
return idx;
}
COM: <s> reads a single texture index </s>
|
funcom_train/50465763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getResource(URL resource, CacheListener listener, CachePolicy policy) throws IOException {
logger.fine("Getting Cached Content for:"+resource.toString());
//First Download it if we have to
downloadResource(null, resource, listener, policy);
File cachedFile = getCachedFileForURL(resource);
return cachedFile.toURL();
}
COM: <s> cache a resource and return its url </s>
|
funcom_train/20837753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int result;
result = (namespace != null ? namespace.hashCode() : 0);
result = 29 * result + (file != null ? file.hashCode() : 0);
result = 29 * result + (url != null ? url.hashCode() : 0);
return result;
}
COM: <s> generate a hashcode depending on the namespace url and file name </s>
|
funcom_train/22548436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tryToDownloadUpdates() {
QUEUE.execute(new Runnable() {
public void run() {
UpdateInformation updateInfo = _updateInfo;
if (updateInfo != null &&
updateInfo.getUpdateURN() != null &&
isMyUpdateDownloaded(updateInfo))
RouterService.getCallback().updateAvailable(updateInfo);
downloadUpdates(_updatesToDownload, null);
}
});
}
COM: <s> sparks off an attempt to download any pending updates </s>
|
funcom_train/7276689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean finishConnect() {
// if we didn't connect at all, tell the rest about this rfd
if (_downloader == null) {
_manager.informMesh(_rfd, false);
return false;
} else if (_interrupted.get()) {
// if the worker got killed, make sure the downloader is stopped.
_downloader.stop();
_downloader = null;
return false;
}
return true;
}
COM: <s> performs actions necessary after the connection process is finished </s>
|
funcom_train/37721166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInsets(GridBagConstraints gbc, String str) {
StringTokenizer strtok = new StringTokenizer(str, ",");
gbc.insets = new Insets(
Integer.parseInt(strtok.nextToken()),
Integer.parseInt(strtok.nextToken()),
Integer.parseInt(strtok.nextToken()),
Integer.parseInt(strtok.nextToken()));
}
COM: <s> add an insets object from the given string </s>
|
funcom_train/6290832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void previewMessage() {
previewMode = true;
// the message is saved to outbox, it must be deleted when BACK button
// is pressed!!
viewMessage(getMujMailInstance().getSendMail().createAndSaveMessage(getMujMailInstance().outBox), null);
}
COM: <s> preview the message that user immediately writes </s>
|
funcom_train/18729236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void regenerate() {
if (frame != null) {
frame.clear();
space.clear();
space.add(getNet());
space.add(frame);
prepareNet(getNet());
if (single) {
createSingleFacade(getNet());
} else {
createDoubleFacade(getNet());
}
}
}
COM: <s> regenerate the entire facade deleting what ever was there before </s>
|
funcom_train/2572203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List myProviders() {
List myNodes = new List();
double lottery;
for (int i = 0; i < Main.NumInterm; i++) {
lottery = GRnd.unif(0, 1);
if (lottery < Main.reachness) { // add 90% approx of all the stores
myNodes.add(Main.stores[i]);
}
}
return myNodes;
}
COM: <s> generates all the provider stores of this node at this time </s>
|
funcom_train/31028828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFlattening() {
ShellNameCollection shellNames;
String names;
shellNames = new ShellNameCollection();
assertEquals("", shellNames.flatten());
shellNames.addName("Mikis");
assertEquals("Mikis", shellNames.flatten());
shellNames.addName("Ben");
assertEquals("Mikis,Ben", shellNames.flatten());
shellNames.clear();
shellNames.addName("Bob Bob");
assertEquals("Bob Bob", shellNames.flatten());
}
COM: <s> test flattening the collection into a string then parsing it back </s>
|
funcom_train/2878334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean parseFile(File srcFile) throws FileNotFoundException {
String filename = srcFile.getAbsolutePath();
if (!srcFile.exists()) {
throw new FileNotFoundException(filename);
}
parsedDescriptor = SFParse.parseFileToResults(filename, null, options);
return !buildErrorList();
}
COM: <s> define from a file </s>
|
funcom_train/48622217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteFile(FileInfo fileInfo) {
//this implementation does need a file database id.
DefaultFileInfo info = (DefaultFileInfo)fileInfo;
boolean removed = false;
if( info != null )
{
TreeFolderInfo folder = info.getFolderInfo();
try
{
log.debug("Making file info " + info + " transient " );
removed = folder.removeFileInfo(info);
if(removed)
{
fileInfoDAO.makeTransient(info);
}
}
catch(Exception e)
{
throw new RuntimeException(e);
}
}
return removed;
}
COM: <s> remove the file from the file system </s>
|
funcom_train/46157234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IDHolder getIDHolder() {
IDHolder out;
try {
out = (IDHolder) AppContext.getDataManager().getBinding(NEXT_ID_BINDING);
} catch (NameNotBoundException nnbe) {
out = new IDHolder();
AppContext.getDataManager().setBinding(NEXT_ID_BINDING, out);
}
return out;
}
COM: <s> get the id holder creating it if necessary </s>
|
funcom_train/38976323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getActivityName(Activity activity) {
String canonicalName = activity.getClass().getCanonicalName();
if (activityNameMap.containsKey(canonicalName)) {
return activityNameMap.get(canonicalName);
} else {
String name = parameterFetcher.getString(canonicalName);
if (name == null) {
name = canonicalName;
}
activityNameMap.put(canonicalName, name);
return name;
}
}
COM: <s> look up the activitys display name as defined in a string resource named </s>
|
funcom_train/3315501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeAll(Collection<?> c){
boolean reply;
BigInteger otherMask = getMaskOf(c);
if (otherMask != null){
BigInteger oldMask = mask;
mask = mask.andNot(otherMask);
reply = !mask.equals(oldMask);
} else {
reply = super.removeAll(c);
}
return reply;
}
COM: <s> removes from this collection all of its elements that are contained in </s>
|
funcom_train/39371580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearTape(Tape t) throws UnknownTapeException {
if (isTape(t)) {
HashMap old = t.getContent();
t.clearTape();
if (undoRedo != null && undoEnabled)
undoRedo.performedOperation(this, new Operation(
Operation.opType.TAPE_CLEAR, new Object[]{old, t}));
} else
throw new UnknownTapeException(
Turingmachine.class.getCanonicalName()
+ " / the passed tape is not part of this turingmachine / not clearing tape");
}
COM: <s> all symbols stored on the tape are removed </s>
|
funcom_train/3272321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setInt(String key, int val) {
Object oldVal = keyValues.put(key, new Integer(val));
sendAttributeChangeNotifications(key, oldVal, (new Integer(val)));
if (oldVal == null) {
return -1;
}
return ((Integer)oldVal).intValue();
}
COM: <s> tries to set an integer value </s>
|
funcom_train/510883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex atan() {
Complex IM = new Complex(0.0,-1.0);
Complex ZP = new Complex(1.0+this.y,this.x);
Complex ZM = new Complex(1.0-this.y,this.x);
return IM.multiply(((ZP.log()).subtract(
ZM.log())).divide(2.0));
}
COM: <s> compute the arctangent of a complex number </s>
|
funcom_train/11650872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SampleResult runTest(JavaSamplerContext p_context) {
log.debug(whoAmI() + "\trunTest");
Thread.yield();
SampleResult results = new SampleResult();
results.setSuccessful(false);
results.setResponseData(("Class not found: " + getClassname()), null);
results.setSampleLabel("ERROR: " + getClassname());
return results;
}
COM: <s> return sample result with data on error </s>
|
funcom_train/42951113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BitSet sBoxFunc(BitSet s, boolean inv) {
int idx = Util.toInteger(s, 4);
int result;
if (inv) {
result = SBOX_INV[idx];
} else {
result = SBOX[idx];
}
return Util.toBitSet(result, 4);
}
COM: <s> perform s box substitution on bit set s </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.