__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/1058736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillTable() {
// for each profile, proposes a line with a selection box.
RegisteredProfile[] rProfiles = RegisteredProfile.getRegisteredProfiles();
for (int i = 0; i < rProfiles.length; i++) {
TableItem item = new TableItem(table, SWT.CHECK);
RegisteredProfile rProfile = rProfiles[i];
item.setData(rProfile);
item.setText(rProfile.name);
item.setChecked(rProfilesToApply.contains(rProfile));
}
}
COM: <s> fill table with table items </s>
|
funcom_train/44622868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processBlockStatements(boolean complete) {
while (!remainingStatements.isEmpty()) {
JCStatement s = remainingStatements.remove(0);
condition = trueLiteral;
if (s != null) s.accept(this); // A defensive check - statements in the list should not be null
}
if (complete) completed(currentBlock);
}
COM: <s> iterates through the statements on the remaining statements list processing them </s>
|
funcom_train/46761465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IconModel getIcon(final long iconId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SystemData.getIcon(iconId, chain, call);
}}; return (IconModel) call(method, call);
}
COM: <s> same transaction return the single icon model for the primary key </s>
|
funcom_train/2427635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SqlScript getCopy() {
SqlScript copy = new SqlScript();
copy.entries = new Entry[entries.length];
for (int n = 0; n < entries.length; ++n) {
copy.entries[n] = (entries[n] == null ? null : entries[n].getCopy());
}
return copy;
}
COM: <s> creates and returns a copy of this code sql script code object </s>
|
funcom_train/1774044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void update(Simulation data) throws SQLException {
Connection _con = ConnectionPool.getConnection();
PreparedStatement _state = null;
try{
_state = _con.prepareStatement("UPDATE simulation SET username=? WHERE id=?");
_state.setString(1, data.getUsername());
_state.setInt(2, data.getId());
_state.execute();
log.info("Updated successfully");
}
finally{
if(_state != null){
_state.close();
}
_con.close();
}
}
COM: <s> update land cover database using the give land cover instance </s>
|
funcom_train/23453076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPerformedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Process_performedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Process_performedBy_feature", "_UI_Process_type"),
ProcessPackage.Literals.PROCESS__PERFORMED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the performed by feature </s>
|
funcom_train/50879222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape getShapePoint(){
if (myPosativeList.size() == 0) return null;
if (myPosativeList.size() == 1) return (Point) myPosativeList.get(0);
Point[] tempPoints = new Point[myPosativeList.size()];
myPosativeList.toArray(tempPoints);
MultiPoint tempMultiPoint = new MultiPoint(tempPoints);
return tempMultiPoint;
}
COM: <s> return the point from the arrays </s>
|
funcom_train/30280296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "InitDuration [queueName=" + queueName
+ ", assignedTotalNumber=" + assignedTotalNumber
+ ", assignedTotalTimes=" + assignedTotalTimes
+ ", assignedLifelessTime=" + assignedLifelessTime
+ ", acceptedTotalNumber=" + acceptedTotalNumber
+ ", acceptedTotalTimes=" + acceptedTotalTimes
+ ", acceptedLifelessTime=" + acceptedLifelessTime
+ "]";
}
COM: <s> returns a string representation of init duration </s>
|
funcom_train/50467331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertEmptyColumn(int index) {
if (index > cols.size()) {
int count = index - cols.size();
for (int i = 0; i < count + 1; i++) {
cols.add(new Column());
}
}
else {
cols.add(index, new Column());
}
}
COM: <s> insert empty column at index </s>
|
funcom_train/12702822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkEditMenu(EditorWidgetInterface widget,MouseEvent e) {
if (e.isPopupTrigger()) {
JPopupMenu popup=widget.getPopupMenu(this);
if (popup.getComponentCount()>0) {
popup.show(e.getComponent(),e.getX(),e.getY());
return;
}
}
}
COM: <s> check if a mouse event should raise the widget context menu </s>
|
funcom_train/33704010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMonthPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Date_month_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Date_month_feature", "_UI_Date_type"),
BankabeulePackage.Literals.DATE__MONTH, true, false, false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the month feature </s>
|
funcom_train/46106581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readSchema() throws ObviousxException {
CSVTableImport nodeImport = new CSVTableImport(nodeFile, null, separator);
nodeImport.readSchema();
nodeSchema = nodeImport.getSchema();
CSVTableImport edgeImport = new CSVTableImport(edgeFile, null, separator);
edgeImport.readSchema();
edgeSchema = edgeImport.getSchema();
}
COM: <s> reads the schema for nodes and edges described csv files </s>
|
funcom_train/28308621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Container createContainer(Object content) {
Container newContainer = ContainerCreator.createContainer(content);
if (additionalAttributes != null) {
for (String attributeName : additionalAttributes.keySet()) {
newContainer.setAttribute(attributeName, additionalAttributes.get(attributeName));
}
}
return newContainer;
}
COM: <s> creates a container based on the content supplied </s>
|
funcom_train/36887912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RecurrentChargesAddView convert(RecurrentChargesAddDto dto){
RecurrentChargesAddView view = null;
if (dto != null){
view = new RecurrentChargesAddView();
view.setPlantId(dto.getPlantId());
view.setTransportId(dto.getTransportId());
view.setCostElementId(dto.getCostElementId());
view.setCurrencyId(dto.getCurrencyId());
}
return view;
}
COM: <s> converter dto to view </s>
|
funcom_train/39245404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPluralizeMultiWordTable() {
// given column name should ref expected table (based on RoR conventions)
String columnName = "active_ingredient_id";
String expectedTableName = "active_ingredients";
String singular = columnName.substring(0, columnName.length() - 3);
String primaryTableName = Inflection.pluralize(singular);
assertEquals(expectedTableName, primaryTableName);
}
COM: <s> test rails naming convention conversion for multi word tables </s>
|
funcom_train/37857963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void storeFavourites(ListModel model) {
Favourite favs[] = new Favourite[model.getSize()];
// Write a node for each item in model.
for (int i=0; i < model.getSize(); i++) {
favs[i]= (Favourite)model.getElementAt(i);
}
storeFavourites(favs);
}
COM: <s> saves the connections favourites using the preferences api </s>
|
funcom_train/42642906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferencedSourcePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ITermParts_ReferencedSource_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ITermParts_ReferencedSource_feature", "_UI_ITermParts_type"),
DigitalHPSPackage.Literals.ITERM_PARTS__REFERENCED_SOURCE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the referenced source feature </s>
|
funcom_train/17142740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleClosedMultiLines() {
if (!isClosed())
return;
List<? extends IPoint2D> points = _multiLine.getPoints();
int numberOfPoints = points.size();
numberOfPoints--; //Start point also end point
if (numberOfPoints < 1)
return;
_linePropertiesList.set(Constants.ZERO,_linePropertiesList.get(numberOfPoints));
_pointPropertiesList.set(Constants.ZERO,_pointPropertiesList.get(numberOfPoints));
}
COM: <s> for closed there the start and the end point is the same </s>
|
funcom_train/13712650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
String result = "<" + kindOfElement;
for (Iterator it = attributes.keySet().iterator(); it.hasNext(); ) {
String key = (String)it.next();
result += " " + key + "=\"" + attributes.get(key) + "\"";
}
result += ">";
return result;
}
COM: <s> this method returns the string representing an element </s>
|
funcom_train/30073146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unmaximizeGraphPanel() {
if (XBayaGUI.this.graphPanelMaximized) {
XBayaGUI.this.graphPanelMaximized = false;
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
XBayaGUI.this.mainSplitPane
.setDividerLocation(XBayaGUI.this.previousMainDividerLocation);
XBayaGUI.this.rightSplitPane
.setDividerLocation(XBayaGUI.this.previousRightDividerLocation);
}
});
}
}
COM: <s> set the size of the graph panel to the original </s>
|
funcom_train/33440208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCompleteValue (final String[] isbn) {
this.delegateObject.setCompleteValue (isbn);
if (!(this.delegateObject.getNumber().startsWith ("978")
|| this.delegateObject.getNumber().startsWith ("979"))) {
throw new IllegalArgumentException ("Number is not an ISBN, because it starts not with 978 or 979");
}
}
COM: <s> set the isbn </s>
|
funcom_train/21430514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getBestAccuracyPPM(int s_ind) {
double best_acc = Double.MAX_VALUE;
for( Annotation e : annotations.elementAt(s_ind) ) {
double acc = e.getAccuracyPPM(peak);
if( Math.abs(acc)<Math.abs(best_acc) )
best_acc = acc;
}
return best_acc;
}
COM: <s> return the minimum difference in ppm between experimental and </s>
|
funcom_train/22081945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadListData(List table) {
// Create a new row and add data.
List row = new LinkedList();
row.add(new Integer(3));
row.add("9");
row.add(new Double(2.22));
table.add(row);
// Create a new row and add data.
row = new LinkedList();
row.add(new Integer(3));
row.add("4");
row.add(new Double(4.57));
table.add(row);
// Create a new row and add data.
row = new LinkedList();
row.add(new Integer(3));
row.add("4");
row.add(new Double(4.58));
table.add(row);
}
COM: <s> this method loads data into a list which is later tested </s>
|
funcom_train/50915115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CMLAtomSet getAtomSet() {
getMolecule();
List<CMLBond> bonds = getBonds();
CMLAtomSet atomSet = new CMLAtomSet();
for (CMLBond bond : bonds) {
List<CMLAtom> atoms = null;
atoms = bond.getAtoms();
atomSet.addAtoms(atoms);
}
return atomSet;
}
COM: <s> gets all atoms in set as atom set </s>
|
funcom_train/14501774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String envName) throws ServiceLocatorException {
String ret = null;
try {
ret = (String)getObject(envName);
} catch (ServiceLocatorException e) {
if (e.getCause() instanceof NameNotFoundException) {
// ignore this and return null, otherwise we can not have empty values in Glassfish
ret = null;
}
}
return ret;
}
COM: <s> return a string value corresponding to the env entry </s>
|
funcom_train/32791253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleRelImplies(String codeSrcExp, List<String> args, StringBuffer rule, StringBuffer spec) {
assert(args.size() == 1) : "Logical expression implies needs exactly one argument";
codeAgent.setArgument("rel_exp_1", codeSrcExp);
codeAgent.setArgument("rel_exp_2", args.get(0));
rule.append("logical_expression_tail");
spec.append("implies");
}
COM: <s> parameterizes the code agent for a relational implies operation </s>
|
funcom_train/27714261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getFirstChildElement(int nodeIndex) {
int childIndex = getLastChildElement(nodeIndex);
while (childIndex != -1) {
int prevIndex = getPrevSiblingElement(childIndex);
if (prevIndex == -1) {
break;
}
childIndex = prevIndex;
}
return childIndex;
}
COM: <s> returns the first child element of the specified node </s>
|
funcom_train/43474743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test1000NetworkJoin() throws Exception {
System.out.println("//// TEST NETWORK 1000 JOINS ////");
network = GenericFactory.buildNetwork();
int steps = network.joinNodes(1000);
System.out.println("Nodes joined at [" + steps + "] steps");
steps = network.stabilize();
System.out.println("Stabilizatoin at [" + steps + "] steps");
assertEquals(1000, network.size());
}
COM: <s> builds a network with 1000 nodes with the predefined node class </s>
|
funcom_train/33142462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBooleanOptionSet(Option option, Config c) {
String v = options.get(option);
if (v == null) {
v = c.getDefaultRuleOptions().get(option);
if (v == null) {
throw new Profiler4JError("[INTERNAL] No default set for boolean option "
+ option);
}
}
return Utils.parseBoolean(v);
}
COM: <s> determines whether a boolean option is set </s>
|
funcom_train/18501074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getMethodWithCompetence(String compentece) {
Vector v = new Vector();
Collection col = getMethods();
for (Iterator it = col.iterator(); it.hasNext();) {
CBRMethod method = (CBRMethod) it.next();
List comp = method.getCompetencies();
for (Iterator it2 = comp.iterator(); it2.hasNext();) {
if ((it2.next()).equals(compentece)) {
v.add(method);
continue;
}
}
}
return v;
}
COM: <s> retrieves the available methods for a given competence </s>
|
funcom_train/22929098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void verifyWritePermission(Session session, String path) {
UserAccount userAccount = getUserAccount(session);
FileSystemEntry entry = getFileSystem().getEntry(path);
verifyFileSystemCondition(userAccount.canWrite(entry), path, "filesystem.cannotWrite");
}
COM: <s> verify that the current user has write permission to the specified path </s>
|
funcom_train/9734192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
//jTabbedPane.addTab("JUNG test", jung.createPanel());
jTabbedPane.addTab("Control", control_panel);
jTabbedPane.addTab("Config", config_panel);
jTabbedPane.addTab("Map", map_panel);
jTabbedPane.addTab("TrafficAnalyzer", statistics_panel.createPanel());
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/3926488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String stripQuotes( String s ) {
if ( s == null ) {
return( s );
}
if ( s.length() == 0 ) {
return( s );
}
if ( s.charAt( 0 ) == '"' ) {
if ( s.length() == 1 ) {
return( null );
}
return( s.substring( 1, s.length() - 1 ));
} else {
return( s );
}
}
COM: <s> strip the quotes of a string if any </s>
|
funcom_train/32076553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font getSystemFont () {
checkDevice ();
if (systemFont != null) return systemFont;
int /*long*/ style = OS.gtk_widget_get_default_style();
int /*long*/ defaultFont = OS.pango_font_description_copy (OS.gtk_style_get_font_desc (style));
return systemFont = Font.gtk_new (this, defaultFont);
}
COM: <s> returns a reasonable font for applications to use </s>
|
funcom_train/49045326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonDAB_NBTBCIP() {
if (buttDAB_NBTBCIP == null) {
buttDAB_NBTBCIP = new JRadioButtonMenuItem();
buttDAB_NBTBCIP.setText("DAB NBTBCIP");
buttDAB_NBTBCIP.setToolTipText("DAB NBTBCIP");
buttDAB_NBTBCIP.addActionListener(this);
buttDAB_NBTBCIP.setActionCommand("parameter");
buttDAB_NBTBCIP.setEnabled(true);
}
return buttDAB_NBTBCIP;
}
COM: <s> this method initializes the option dab nbtbcip </s>
|
funcom_train/27845062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initSubModels() {
ListModel subModels = new ListModel();
subModels.add(new TestActiveModel("a", 1));
subModels.add(new TestActiveModel("b", 2));
subModels.add(new TestActiveModel("c", 3));
setSubModels(subModels);
}
COM: <s> init the submodels </s>
|
funcom_train/49405990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GrammaticalConstraint addConstraint(GrammaticalAttribute att, Object value, boolean negated, boolean strict){
GCExpression exp = exprMap.get(att);
if (exp == null){
Set<Object> valueSet = new HashSet<Object>(1);
valueSet.add(value);
exprMap.put(att, new GCExpression(valueSet, negated, strict));
} else {
exp.addValue(value);
}
return this;
}
COM: <s> add a new constraint to an </s>
|
funcom_train/8036597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String concat(final String str1in, final String str2in) {
final String str1 = str1in == null ? EMPTY : str1in;
final String str2 = str2in == null ? EMPTY : str2in;
final StringBuilder buf = new StringBuilder(str1.length()+str2.length());
buf.append(str1);
buf.append(str2);
return buf.toString();
}
COM: <s> concenate a sequence of strings together </s>
|
funcom_train/14009072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(FilterConfig filterConfig) throws ServletException {
_useRootBlogCompatability = Boolean.valueOf(filterConfig.getInitParameter(USE_ROOT_BLOG_COMPATABILITY_IP)).booleanValue();
_logger.debug("Initialized page filter (Root blog compatability: " + _useRootBlogCompatability + ")");
}
COM: <s> initialize the filter </s>
|
funcom_train/8087980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyOutlierTreatment(double[] values) throws Exception {
for (int i = 0; i < m_miningMeta.size(); i++) {
MiningFieldMetaInfo mfi = m_miningMeta.get(i);
values[i] = mfi.applyOutlierTreatment(values[i]);
}
}
COM: <s> apply the outlier treatment methods if any to an incoming instance </s>
|
funcom_train/20269685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkNode(@Nullable Node node, int type) throws MalformedException {
if (node == null) {
throw new MalformedException(
"Expected node type " + type + "; found: null", node);
}
if (node.getType() != type) {
throw new MalformedException(
"Expected node type " + type + "; found: " + node.getType(), node);
}
}
COM: <s> checks a nodes type </s>
|
funcom_train/39466969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoIntegration() {
if (undoIntegrationList.size() == 0) {
//Lib.alert("Can't undo more than 20 steps");
return;
}
ArrayList<CarbonIsotope> newArray =
undoIntegrationList.get(undoIntegrationList.size()-1);
Iterator<CarbonIsotope> ite = newArray.iterator();
listOfCarbonIsotopes.clear();
while (ite.hasNext()) {
listOfCarbonIsotopes.add(ite.next());
}
undoIntegrationList.remove(undoIntegrationList.size()-1);
}
COM: <s> undoes the integration </s>
|
funcom_train/890314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIgnoreCase() {
BeanPropertyCondition condition = new TestableBeanPropertyCondition(null);
assertFalse(condition.isIgnoreCase());
BeanPropertyCondition condition2 = condition.ignoreCase();
assertNotNull(condition2);
assertSame(condition, condition2);
assertTrue(condition.isIgnoreCase());
}
COM: <s> test method for bean property condition </s>
|
funcom_train/42364668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean horizontalCondition(Player p, int neededCoinCount){
for (int i = 0; i < ROW_COUNT; i++) {
int counter = 0;
for (int j = 0; j < COLUMN_COUNT; j++) {
if (playboard[i][j] == p.getSymbol()) {
++counter;
} else {
counter = 0;
}
if (counter == neededCoinCount){
return true;
}
}
}
return false;
}
COM: <s> this method checks if the given player has the horizontal win condition fulfilled </s>
|
funcom_train/51119254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToPlayList(File file) {
if (file.isFile() && file.getName().toLowerCase().endsWith(".mp3"))
playList.add(new Song(file));
else if (file.isDirectory()) {
File[] f = file.listFiles();
for (int i = 0; i < f.length; i++)
addToPlayList(f[i]);
}
playlistChange();
if (current == null && size() > 0) {
current = (Song) playList.getFirst();
stateChange();
}
}
COM: <s> add new mp3 file to playlist </s>
|
funcom_train/41875647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() throws SavantBuildException {
if (group == null) {
throw new SavantBuildException("group attribute is required for a localproject");
}
if (name == null) {
throw new SavantBuildException("name attribute is required for a localproject");
}
if (dir == null) {
throw new SavantBuildException("dir attribute is required for a localproject");
}
}
COM: <s> validate that the project is configured correctly </s>
|
funcom_train/20079178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ISelection getCheckedSelection() {
ListItem[] items = list.getChecked();
if (items.length == 0) {
return DefaultSelection.EMPTY;
}
ArrayList checked = new ArrayList();
for (int i = 0; i < items.length; i++) {
checked.add(items[i].getData());
}
return new DefaultSelection(checked);
}
COM: <s> returns the current checked selection </s>
|
funcom_train/41806711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateRGB2(int rgb) {
red = (rgb >> 16) & 0xff;
green = (rgb >> 8) & 0xff;
blue = rgb & 0xff;
redField.setText(String.valueOf(red));
greenField.setText(String.valueOf(green));
blueField.setText(String.valueOf(blue));
}
COM: <s> set the rgb values based on a calculated argb int </s>
|
funcom_train/49461489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCorrectReportStatusId(Db db, String status) throws Exception{
try {
db.enter();
st_get_report_status.setString(1, status);
Integer ret = DbHelper.getKey(st_get_report_status);
if(ret != null)
return ret.intValue();
//the status doesn't exists
_logger.warn("Report status "+status+" not found. Using default status");
return DEFAULT_report_status;
}
finally {
db.exit();
}
}
COM: <s> get the report status id corresponding to this label </s>
|
funcom_train/45623071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWin32ResourcePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CscType_win32Resource_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CscType_win32Resource_feature", "_UI_CscType_type"),
MSBPackage.eINSTANCE.getCscType_Win32Resource(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the win32 resource feature </s>
|
funcom_train/24627129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*public InputStream getInputStream(DocInfo di, String filename, int type) throws IOException, UnknownHostException, FileNotFoundException {
InputStream in = getInputStream(ci, filename, type);
if (di.returncode!=200 && di.returncode!=304) setSeen(surl, false);
return in;
}*/
COM: <s> first normalizes uri </s>
|
funcom_train/4933561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillNewTriple( StringBuilder rhsResult, String subject, String predicate, String object ) {
rhsResult
.append( " newTriple.setSubject( " + n3ValueToOperand( subject ) + ");\n" )
.append( " newTriple.setPredicate( " + n3ValueToOperand( predicate ) + ");\n" )
.append( " newTriple.setObject( " + n3ValueToOperand( object )
+ ".toString() );\n" );
}
COM: <s> populate new triple java variable in the generated drools </s>
|
funcom_train/19686235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
bufRX=new byte[maxSize];
try {
while(true){
int length=bis.read(bufRX,0,maxSize);
Long NodeID=ipg.byteToMsg(bufRX,(short)length);
}
}
catch (Exception ioe) {
ipg.reportFailure(cs.getInetAddress().getHostAddress());
}
finally {
try {
if (bis != null)
bis.close();
if (cs != null)
cs.close();
}
catch (IOException ioee) {
System.err.println(ioee);
}
}
}
COM: <s> this method is invoked as a separate thread </s>
|
funcom_train/38221782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void performBackspace() {
String value = expressionText.getText();
if (value.length() == 0) {
return;
}
StringBuffer sb = new StringBuffer(value.substring(0, value.length()-1));
expressionText.setText(sb.toString());
setCursorPosition(sb.length());
}
COM: <s> performs the backspace command </s>
|
funcom_train/28490927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadAllMissions(Container data) throws CISException, IOException {
if (con==null){
throw new CISException("Keine Connection");
}
logger.info("Gathering all Missions");
JSONArray w =(JSONArray)con.query("query","select * from missions order by miss_id");
ArrayList<Mission> missions = new ArrayList<Mission>();
for (int i = 0; i < w.size(); i++) {
Mission m = new Mission();
m.unmarshall((JSONObject)w.get(i));
missions.add(m);
}
data.setAllMissions(missions);
}
COM: <s> alle m glichen missionen laden </s>
|
funcom_train/18752020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GraphTransitionStub createInTransitionStub(GraphState source, RuleEvent event, Node[] addedNodes) {
if (source == source() && event == getEvent()) {
return this;
} else if (source != source() && event == getSourceEvent()) {
return this;
} else {
return new IdentityTransitionStub(event, addedNodes, this);
}
}
COM: <s> this implementation returns code this code if the derivations event </s>
|
funcom_train/18479452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Patch setCP(int i,int j,Point3 cp) {
Point3[] new_pts = new Point3[16] ;
for(int k = 0; k < pts.length; k++) {
new_pts[k] = pts[k] ;
}
pts[i * 4 + j] = cp ;
return new Patch(new_pts) ;
}
COM: <s> sets the control point indexed by i j </s>
|
funcom_train/33776100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getState() {
if (mService != null) {
try {
return mService.getState();
} catch (RemoteException e) {Log.e(TAG, e.toString());}
} else {
Log.w(TAG, "Proxy not attached to service");
}
return BluetoothHeadset.STATE_ERROR;
}
COM: <s> get the current state of the bluetooth headset service </s>
|
funcom_train/13938079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2DList getPoint2DListEdges(){
// doesn't take into account faces that may be on the inside of an object (drilled hole)
Point2DList p2DList = new Point2DList();
Point2D conPt = new Point2D(0.0, 0.0);
if(prim2DCycle.size() > 0){
conPt = prim2DCycle.getFirst().ptA;
}
for(Prim2D prim : prim2DCycle){
p2DList.add(conPt);
conPt = prim.hasPtGetOther(conPt);
p2DList.add(conPt);
}
return p2DList;
}
COM: <s> generate and return a list of point2 d pairs that specify </s>
|
funcom_train/7660596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAll4() {
try {
ArrayBlockingQueue q = new ArrayBlockingQueue(1);
Integer[] ints = new Integer[SIZE];
for (int i = 0; i < SIZE; ++i)
ints[i] = new Integer(i);
q.addAll(Arrays.asList(ints));
shouldThrow();
}
catch (IllegalStateException success) {}
}
COM: <s> add all throws ise if not enough room </s>
|
funcom_train/16380485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCorrectionHintPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SubTaskDefType_correctionHint_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SubTaskDefType_correctionHint_feature", "_UI_SubTaskDefType_type"),
CTEPackage.Literals.SUB_TASK_DEF_TYPE__CORRECTION_HINT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the correction hint feature </s>
|
funcom_train/44748361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMeasuredPeaks(MeasuredPeak[] peaks) {
/* double[] nd = new double[peaks.length];
for (int i = 0; i < peaks.length; i++) {
MeasuredPeak peak = peaks[i];
nd[i] = peak.getMass();
}
setPeaks(nd);
*/ mPeaks=peaks;
}
COM: <s> wrapper for measured peak objects </s>
|
funcom_train/494808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate( ValidatableObject vo ) throws SAXException {
if( validatedObjects.add(ProxyGroup.unwrap(vo)) ) {
// setup a new validator for this object and validate it.
MSVValidator.validate(jaxbContext,this,vo);
} else {
// this object has already been validated once.
reportEvent( vo, Messages.format( Messages.CYCLE_DETECTED ) );
}
}
COM: <s> validates the sub tree rooted at code vo code and reports </s>
|
funcom_train/27785986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WatchScreen getWatchScreen(String name) {
try {
List names = PreferencesManager.getWatchScreenNames();
if(names.contains(name))
return PreferencesManager.getWatchScreen(name);
} catch(PreferencesException e) {
// This basic UI element should fail if there is an error parsing a
// watch screen. So it just silently ignores it and pretends it
// doesn't exist.
}
return null;
}
COM: <s> return the watch screen with the given name or code null code </s>
|
funcom_train/28352276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void knobGenerationFailed( final BumpGenerator generator, final Exception exception ) {
try {
SwingUtilities.invokeAndWait( new Runnable() {
public void run() {
JOptionPane.showMessageDialog( BumpGeneratorDialog.this, exception.getMessage(), "Generator Failed", JOptionPane.ERROR_MESSAGE );
setVisible( false );
}
});
}
catch( Exception runException ) {
runException.printStackTrace();
}
}
COM: <s> handle event indicating that the knob generation failed </s>
|
funcom_train/38861796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getOptionsTabbedPane() {
if (optionsTabbedPane == null) {
optionsTabbedPane = new JTabbedPane();
optionsTabbedPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
optionsTabbedPane.setTabPlacement(JTabbedPane.LEFT);
optionsTabbedPane.addTab("General", null, getGeneralPreference(), null);
}
return optionsTabbedPane;
}
COM: <s> this method initializes options tabbed pane </s>
|
funcom_train/46932147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharSkill addCharSkill(CharSkill charSkill) {
if(skills.contains(charSkill)) {
CharSkill s = (CharSkill)skills.elementAt(skills.indexOf(charSkill));
s.setLevel(charSkill.getLevel());
s.setPoints(charSkill.getPoints());
charSkill = s;
} else {
addSorted(charSkill);
charSkill.setCharSkillGroup(this);
}
return charSkill;
}
COM: <s> add trained skill to group </s>
|
funcom_train/14354114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnDelete() {
if (btnDelete == null) {
btnDelete = new JButton();
btnDelete.setBounds(new Rectangle(75, 2, 80, 26));
btnDelete.setText("Remove");
btnDelete.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if(checkInputs()){
TreeController.getInstance().removeUser(path, getUserObject());
}
}
});
}
return btnDelete;
}
COM: <s> this method initializes btn delete </s>
|
funcom_train/22578258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testComma() {
try {
Map<String, Double> tagCloud = new TreeMap<String, Double>();
tagCloud.put("This string has a , in it", 0d);
new TagCloudException(null, null, tagCloud);
fail("Should have thrown an exception by now");
} catch (IllegalArgumentException ex) {
assertTrue(true);
}
}
COM: <s> make sure tag cant contain a comma </s>
|
funcom_train/40519679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object open(String _url, String _bookName) {
createContents();
shell.open();
shell.layout();
Display display = getParent().getDisplay();
url = _url;
bookName.setText(_bookName);
shell.setText("详情 - 读取中...");
GetBookInfo getBookInfo = new GetBookInfo(url);
getBookInfo.start();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
return result;
}
COM: <s> open the dialog </s>
|
funcom_train/45502213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void computePlane() {
if( plane == null )
plane = new Plane( v[0], v[1], v[2] );
else
plane.setPlane( v[0], v[1], v[2] );
//BspMain.planes.add( plane )
faceNormal = plane.getNormal();
}
COM: <s> recomputes the plane equations and the normal </s>
|
funcom_train/25331476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetAndGetTarget() {
final MappableObject target = this.context.mock(MappableObject.class, "obj1");
Mapping instance = new Mapping();
assertNull(instance.getTarget());
instance.setTarget(target);
assertEquals(target, instance.getTarget());
}
COM: <s> test of set target method of class mapping </s>
|
funcom_train/1530836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double compute(double a, double b) {
if (a <= b)
return AlgoIntegralDefinite.adaptiveGaussQuad(arcLengthFunction, a, b);
else
return AlgoIntegralDefinite.adaptiveGaussQuad(arcLengthFunction, 0, Kernel.PI_2)
- AlgoIntegralDefinite.adaptiveGaussQuad(arcLengthFunction, b, a);
}
COM: <s> computes the arc length of an ellipse where </s>
|
funcom_train/5001627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAnalysisProperty(Property analysisProperty){
this.leftCAnalysisProperty = analysisProperty;
this.rightCAnalysisProperty = analysisProperty;
this.keywordAnalysisProperty = analysisProperty;
this.lines=new ArrayList<Line>(Collections.nCopies(nLines, (Line) null));//we could make it less radically. But teh data is cached anyway...
if(cache.get(analysisProperty) == null)
cache.put(analysisProperty, new CqpDataProxy(analysisProperty));
}
COM: <s> set the analysis property </s>
|
funcom_train/8092886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkModel(int minNumInstances){
//checks if there are at least 2 subsets that contain >= minNumInstances
int count = 0;
for (int i = 0; i < m_distribution.numBags(); i++) {
if (m_distribution.perBag(i) >= minNumInstances) count++;
}
return (count >= 2);
}
COM: <s> checks if there are at least 2 subsets that contain min num instances </s>
|
funcom_train/38337217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void compileJoins(CompileCallInformation information) throws RuleCompilingException {
// at first, we take an initialfact for having beta input
// from all of our condition's last nodes (like also done
// in old rule compiler)
Template initFact = engine.getInitialTemplate();
Node initialFact = getObjectTypeNode(initFact);
information.lastJoin=joinConditions(information, information.rule.getConditions(), initialFact);
}
COM: <s> compiles the seperated condition nodes to one network by using </s>
|
funcom_train/10190725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOfCommaHeaderSeparator() {
boolean inside_quoted_string = false;
for (int i = m_nIndex; i < m_strString.length(); i++) {
char c = m_strString.charAt(i);
if (c == '"') {
inside_quoted_string = !inside_quoted_string;
}
if (!inside_quoted_string && c == ',') {
return i;
}
}
return -1;
}
COM: <s> finds the first comma separator </s>
|
funcom_train/7821518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean assign(int job, int worker, boolean infeasibility) {
if (isAssigned(job)) // already assigned
{
return false;
}
if (!infeasibility && !canFeasiblyAssign(job, worker)) {
return false; // we don't want infeasible solutions
}
assignment[job] = worker;
workerTotalTime[worker] += settings.getTime(worker, job);
globalCost += settings.getCost(worker, job);
return true;
}
COM: <s> assiign job to a worker </s>
|
funcom_train/29768366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOperation(Object o, Method m, Method descriptionMethod) {
VSert.argNotNull("o", o);
VSert.argNotNull("m", m);
_operations.add(new KeyWith2Values<Object, Method, Method>(o, m,
descriptionMethod));
}
COM: <s> adds an operation to be benchamrked </s>
|
funcom_train/13505864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResponseHeaderValue(String name, String defaultValue) {
Header header = m_method.getResponseHeader(name);
if (header == null) {
return defaultValue;
} else {
String value = header.getValue();
if (value == null || value.length() == 0) {
return defaultValue;
} else {
return header.getValue();
}
}
}
COM: <s> get a response header value string or code default value code if the </s>
|
funcom_train/13771225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOpenlRun3() throws Exception {
// URL url = this.getClass().getClassLoader().getResource("org/openl/rules/table/IndexLogic.xls");
// OpenlTest.aTestMethodFile(url.getPath(), "org.openl.xls", "main", new Object[] { new String[] {} }, null);
}
COM: <s> ignore the test </s>
|
funcom_train/31873067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*private int getSelected() {
int selected = (int)Math.floor(Math.random()*this.totalQuantity);
for (int i=0;i<this.resources.length;i++) {
if (this.resources[i].available) {
if (selected<this.resources[i].quantity) return i;
selected -= this.resources[i].quantity;
}
}
return -1; // never reached
}*/
COM: <s> select randomly a resource among all available resources </s>
|
funcom_train/3923409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean testTransform( Transform t ) {
boolean ret = !t.equals(client.pos);
for ( int i = 0; i < transformFilter.size() && ret; i++ ) {
ret = ((TransformFilter) transformFilter.elementAt(i)).testTransform( t, client );
}
return ret;
}
COM: <s> test transform against set of filters </s>
|
funcom_train/37861774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURIForPrefix(String prefix) {
String uri = getInScopeNamespace(prefix);
if (uri != null)
return uri;
//TODO : test NS inheritance
uri = getInheritedNamespace(prefix);
if (uri != null)
return uri;
// Check global declarations
return staticNamespaces.get(prefix);
}
COM: <s> first checks the parent context for in scope namespaces </s>
|
funcom_train/28752909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCdnadttlotnum(String newVal) {
if ((newVal != null && this.cdnadttlotnum != null && (newVal.compareTo(this.cdnadttlotnum) == 0)) ||
(newVal == null && this.cdnadttlotnum == null && cdnadttlotnum_is_initialized)) {
return;
}
this.cdnadttlotnum = newVal;
cdnadttlotnum_is_modified = true;
cdnadttlotnum_is_initialized = true;
}
COM: <s> setter method for cdnadttlotnum </s>
|
funcom_train/35697636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object put(Object entity, Object copy) {
if ( entity == null || copy == null ) {
throw new NullPointerException( "null entities and copies are not supported by " + getClass().getName() );
}
entityToOperatedOnFlagMap.put( entity, Boolean.FALSE );
return entityToCopyMap.put( entity, copy );
}
COM: <s> associates the specified entity with the specified copy in this event cache </s>
|
funcom_train/18032441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuEditImageBorder() {
if (m_menuEditImageBorder == null) {
m_menuEditImageBorder = new JMenuItem();
m_menuEditImageBorder.setText(Messages.getString("FBMenu.38")); //$NON-NLS-1$
m_menuEditImageBorder.setMnemonic(Messages.getString("FBMenu.39").charAt(0)); //$NON-NLS-1$
}
return m_menuEditImageBorder;
}
COM: <s> returns the edit image border item </s>
|
funcom_train/18029054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContextAsString() {
System.out.println("contextAsString");
QDataSet ds = null;
String expResult = "";
String result = DataSetUtil.contextAsString(ds);
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 context as string method of class data set util </s>
|
funcom_train/8287983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean activateUser(String userName,String sessionRegId){
DAOUser daoUser = new DAOUser();
User user = daoUser.getUser(userName);
if(null!=user){
if (user.getRegSessionId().equals(sessionRegId)){
daoUser.activateUser(userName);
}
}
return false;
}
COM: <s> activate a user depending on the session registry </s>
|
funcom_train/13383090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createContents() {
shell = new Shell();
shell.setLayout(new GridLayout());
shell.setSize(500, 375);
shell.setText("SWT Application");
final ListViewer listViewer = new ListViewer(shell, SWT.BORDER);
listViewer.setComparator(new ViewerComparator(){
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
// TODO Auto-generated method stub
return super.compare(viewer, e1, e2);
}
});
//
}
COM: <s> create contents of the window </s>
|
funcom_train/16319212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
// first get the treeNode to expand
XmlTreeNode treeNode =
(XmlTreeNode) event.getPath().getLastPathComponent();
// then expands it
if (jTree.undoableExpandReference(treeNode)) {
// in the case of a reference, the expansion must not take place, so it is vetoed
throw new ExpandVetoException(event);
}
}
COM: <s> called each time a node will expand </s>
|
funcom_train/34568124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() throws NagiosException{
if (parserTime != null &&
hostName != null &&
serviceName != null &&
output != null && output.length() > 0 &&
lastCheck != null) {
return true;
} else {
throw new NagiosException(ErrorCodes.CODE_809,"parser time, host name, service name, nagios output. last check");
}
}
COM: <s> if this line is not valid then throw an exception </s>
|
funcom_train/7876199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void layoutVertical() {
scroll.setOrientation(Adjustable.VERTICAL);
JPanel centro = new JPanel(new GridLayout(months.length, 1));
for (int i = 0; i < months.length; i++) {
centro.add(months[i]);
}
add(centro, BorderLayout.CENTER);
layoutScrollAndYear();
}
COM: <s> method used to layout vertical </s>
|
funcom_train/36667602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getSourceInstance(){
Object sourceInstance = storage.getSourceInstance();
if(sourceInstance == null){
try{
sourceInstance = handler.getSourceInstance(sourceClass);
storage.setSourceInstance(sourceInstance);
} catch(IllegalAccessException ilae){
log.error(msg("Cannot create instance of Storage"), ilae);
} catch(InstantiationException ie){
log.error(msg("Cannot create instance of Storage"), ie);
}
}
return sourceInstance;
}
COM: <s> fetch reference class from storage sources handler </s>
|
funcom_train/44551752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String normalize(String s) {
return s != null ? s.replaceAll("[,.!@#$%^&{}'~`\\*;:\r\n!\\?\\[\\]\\\\\\/\\(\\)\"]", "").trim() : "";
}
COM: <s> remove invalid characters from the string </s>
|
funcom_train/45541206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void activateWorkingSet(IWorkingSet workingSet) {
if (fWorkingSetModel != null) {
fWorkingSetModel.addActiveWorkingSet(workingSet);
} else {
// PackageExplorerPart activePart= getActivePackageExplorer();
// if (activePart != null) {
// activePart.getWorkingSetModel().addActiveWorkingSet(workingSet);
// }
}
}
COM: <s> adds the given working set to the set of currently active working sets </s>
|
funcom_train/33161793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DisplayIndependentPoint determineCenterPoint (List roots) {
double totalX = 0, totalY = 0;
for ( Iterator iterator = roots.iterator(); iterator.hasNext(); ) {
InternalNode entity = (InternalNode)iterator.next();
totalX += entity.getInternalX();
totalY += entity.getInternalY();
}
return new DisplayIndependentPoint (totalX / roots.size(), totalY / roots.size());
}
COM: <s> find the center point between the roots </s>
|
funcom_train/6493691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delay(final int delay) {
try {
Thread.sleep(delay); //wait 2 seconds
//not using animationThread.sleep(50);
} catch (InterruptedException ei) {
error("Exception-delay(), StackTrace:" + ei.getStackTrace());
repaint();
}
}
COM: <s> delay the thread </s>
|
funcom_train/2759605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processStartOrEndTag(ParseContext pc) throws IOException {
//System.out.println(">processStartOrEndTag");
int c = pc.getReader().read();
if(c == -1) {
return;
} else if(c == '/') {
processEndTag(pc);
} else {
pc.getReader().unread(c);
processStartTag(pc);
}
//System.out.println("<processStartOrEndTag");
}
COM: <s> processes either a start or an end tag </s>
|
funcom_train/43558084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node newRamp() {
final Box box = new Box("ramp-mesh", Vector3.ZERO, 3, 0.2, 7);
final Node n = new Node("ramp");
final Matrix3 rot = new Matrix3();
rot.fromAngleNormalAxis(30 * MathUtils.DEG_TO_RAD, Vector3.UNIT_X);
box.setRotation(rot);
box.setTranslation(0, 1.75, 0);
n.attachChild(box);
box.setModelBound(new BoundingBox());
return n;
}
COM: <s> create a 3 x 0 </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.