__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/19259511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void usedByArea( boolean flag, DLGArea theArea ) {
if (flag == true && theArea != null) {
if (areaLinks == null) areaLinks = new ArrayList();
if (!areaLinks.contains(theArea))
areaLinks.add(theArea);
} else if (areaLinks != null) {
if (areaLinks.contains(theArea))
areaLinks.remove(theArea);
}
}
COM: <s> sets wether or not this line is a boundary for an area </s>
|
funcom_train/42345543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSchema() {
PreparedStatement stmt = stmts.get(READ_SETTING);
ResultSet rs = null;
try {
stmt.setString(1, "schema");
rs = stmt.executeQuery();
if(rs.next())
return rs.getInt(1);
return -1;
} catch (SQLException e) {
LOG.error(SQL_ERROR, e);
return -1;
} finally {
try {
if(rs != null)
rs.close();
} catch(SQLException e) {
LOG.error(SQL_ERROR, e);
}
}
}
COM: <s> get the current schema version for the database </s>
|
funcom_train/46281514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() throws OmmsManagerException {
logger().entering(this, "initialize");
try {
settings = new ServerSettings(getHomeDirectory());
serviceManager = ServiceManager.getInstance();
} catch (OmmsException e) {
e.printStackTrace();
logger().error(e);
throw new OmmsManagerException(e);
}
//Register Global ActionHandlers.
handlers.add(new ServiceDiscoveryActionHandler( getServiceManager() ));
initialized = true;
//Start the response monitor.
monitor.start();
}
COM: <s> initializes the manager </s>
|
funcom_train/953917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String formatTime(long time) {
StringBuffer sb = new StringBuffer();
sb.append((time / 1000 / 60 / 60) % 24);
sb.append(":");
if ((time / 1000 / 60) % 60 < 10)
sb.append('0');
sb.append((time / 1000 / 60) % 60);
sb.append(":");
if ((time / 1000) % 60 < 10)
sb.append('0');
sb.append((time / 1000) % 60);
return sb.toString();
}
COM: <s> this takes a long that specifies a time in milliseconds then converts </s>
|
funcom_train/16560036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(File file) throws FileNotFoundDriverException {
try {
fin = new FileInputStream(file);
channel = fin.getChannel();
buffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size());
// create the header to contain the header information.
myHeader = new DbaseFileHeader();
myHeader.readHeader(buffer);
} catch (IOException e) {
throw new FileNotFoundDriverException(file.getName(),e,file.getAbsolutePath());
}
}
COM: <s> read the dbf file into memory </s>
|
funcom_train/25030171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void autoAutoIndent(TextPad t) {
String path = t.getPath();
// if tab set to auto-indent, or file fits auto-indent extension in prefs
// and prefs set to auto-indent, then auto-indent
if (t.isAutoIndent() || getPrefs().getAutoIndent() && isAutoIndentExt(path)) {
t.setAutoIndent(true);
}
}
COM: <s> automatically auto indents the given text pad </s>
|
funcom_train/35157284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSize(int width, int height) {
java.awt.GraphicsDevice dev = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if (dev.getFullScreenWindow() != this) {
mainCanvas.setSize(width,height);
this.pack();
mainCanvas.repaint();
}
}
COM: <s> resizes this gljframe to match a glcanvas of the specified size </s>
|
funcom_train/49427134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(boolean visible) {
if(this.visible != visible) {
this.visible = visible;
if(!visible) {
GUI gui = getGUI();
if(gui != null) {
gui.widgetHidden(this);
}
if(parent != null) {
parent.childHidden(this);
}
}
if(parent != null) {
parent.childVisibilityChanged(this);
}
}
}
COM: <s> changes the visibility flag of this widget </s>
|
funcom_train/9277243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws SQLException {
getConnection().setAutoCommit(false);
Statement stmt = createStatement();
stmt.executeUpdate("create table t1 (c11 int, c12 smallint, c13 double, c14 char(3))");
stmt.execute("insert into t1 values(1,1,1.1,'abc')");
stmt.execute("insert into t1 values(-1,-1,-1.0,'def')");
stmt.execute("create table t2 (c21 int)");
stmt.execute("insert into t2 values (-1),(-2)");
stmt.close();
}
COM: <s> set the fixture up with tables </s>
|
funcom_train/3370653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAll() {
setSelectedIndexImpl(-1, true);
int tabCount = getTabCount();
// We invoke removeTabAt for each tab, otherwise we may end up
// removing Components added by the UI.
while (tabCount-- > 0) {
removeTabAt(tabCount);
}
}
COM: <s> removes all the tabs and their corresponding components </s>
|
funcom_train/4920785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidDutyKey() {
// Record invalid duty key
this.record_loadAdminType(DutyKey.ONE, InvalidDutyKey.INVALID_DUTY_KEY);
this.record_issue("Key " + InvalidDutyKey.INVALID_DUTY_KEY
+ " for duty 1 is invalid (type="
+ InvalidDutyKey.class.getName() + ", required type="
+ DutyKey.class.getName() + ")");
// Attempt to load
this.loadAdministratorType(false, null);
}
COM: <s> ensure issue if invalid </s>
|
funcom_train/3077028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List searchBuilds(SearchCriteria condition, int start, int count) {
List buildFacades = new ArrayList();
Iterator it = Luntbuild.getDao().searchBuilds(condition, start, count).listIterator();
while (it.hasNext()) {
Build build = (Build) it.next();
buildFacades.add(build.getFacade());
}
return buildFacades;
}
COM: <s> search for builds in the system </s>
|
funcom_train/21306028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenuTxartelak() {
if (jMenuTxartelak == null) {
jMenuTxartelak = new JMenu();
jMenuTxartelak.setText("Txartelak");
jMenuTxartelak.add(getJMenuItemEman());
jMenuTxartelak.add(getJMenuItemJaso());
jMenuTxartelak.add(getJMenuItemGaitu());
// jMenuTxartelak.add(getJMenuItemDesgaitu());
}
return jMenuTxartelak;
}
COM: <s> this method initializes j menu txartelak </s>
|
funcom_train/7981112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNewline(){
assertEquals("nothing should be in the buffer", "", buf.toString());
buf.newline();
assertTrue("should contain newline", buf.toString().indexOf('\n')!=-1);
assertEquals("line position should be 0",0,buf.linePos);
}
COM: <s> test the newline </s>
|
funcom_train/29656923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLink(final int link, float y, int page) {
if (y == -1) {
y = this.y;
}
if (page == -1) {
page = this.page;
}
Map<Integer, Float> map = new HashMap<Integer, Float>();
map.put(Integer.valueOf(page), Float.valueOf(y));
this.links.put(Integer.valueOf(link), map);
}
COM: <s> set destination of internal link </s>
|
funcom_train/3727861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Color getEdgeColor(Edge edge,boolean isHighlighted,boolean isDragging,boolean isShowBlackAndWhite) {
if (isShowBlackAndWhite)
return Color.gray;
else if (isHighlighted || isDragging)
return Color.red;
/* else {
if (edge instanceof PropertyDomainEdge )
return Color.magenta;
else */
return Color.green;
// }
}
COM: <s> returns the color for the edge </s>
|
funcom_train/43204940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setJMenuBar(getJJMenuBar());
jFrame.setSize(640, 480);
jFrame.setContentPane(getJContentPane());
jFrame.setTitle("Trade Reconciler");
}
return jFrame;
}
COM: <s> this method initializes j frame </s>
|
funcom_train/34557933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addButton(ToolbarButton button) {
if (isRendered()) {
JavaScriptObject componentJS = button.isCreated() ? button.getOrCreateJsObj() : button.getConfig();
addButtonPostRender(componentJS);
} else {
JavaScriptObject componentJS = button.isCreated() ? button.getOrCreateJsObj() : button.getConfig();
addButtonPreRender(componentJS);
}
}
COM: <s> adds a button to the toolbar </s>
|
funcom_train/9553848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("RC5AttackWorkUnit:\n");
sb.append(" id = " + id);
sb.append(" keyLength = " + keyLength);
sb.append(" startKeyValue = " + startKeyValue);
sb.append(" keyRange = " + keyRange + "\n");
return sb.toString();
}
COM: <s> returns information of this instance </s>
|
funcom_train/1156676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startIndexing(final JPanel view) {
Runnable r = new Runnable() {
@Override
public void run() {
try {
prepare(view);
} catch (Exception e) {
Logger log = Logger.getLogger(GutenbergSearch.class.getName());
log.log(Level.WARNING, e.getMessage());
}
}
};
discardingSingleThreadIndexer.execute(r);
}
COM: <s> starts indexing the gutenberg website with jpanel view </s>
|
funcom_train/35192515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuilder readFile(File path) {
if (path == null) {
return null;
}
BufferedReader br = null;
StringBuilder result = null;
result = new StringBuilder();
int ch = 0;
try {
br = new BufferedReader(new FileReader(path));
while ((ch = br.read()) != -1) {
result.append((char) ch);
}
return result;
} catch (IOException e) {
return null;
} finally {
try {
if (br != null) {
br.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
COM: <s> reads some data from file and appends it to a buffer </s>
|
funcom_train/4048515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int stop(int exitCode) {
if (WrapperManager.isDebugEnabled()) {
System.out.println("WrapperSimpleApp: stop(" + exitCode + ")");
}
// Normally an application will be asked to shutdown here. Standard Java applications do
// not have shutdown hooks, so do nothing here. It will be as if the user hit CTRL-C to
// kill the application.
return exitCode;
}
COM: <s> called when the application is shutting down </s>
|
funcom_train/31626835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addCloneLink(final String nodeId, final ExpressoResponse response) throws ControllerException {
if (!isEmbeddedMode(response.getExpressoRequest())) {
Transition trans = new Transition("Duplicate", NodeAction.class,
NodeAction.PROMPT_CLONE_NODE);
trans.addParam(Node.NODE_ID, nodeId);
response.add(trans);
}
}
COM: <s> adds the clone link </s>
|
funcom_train/40944663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSelected(Object itemId) {
if (itemId == null) {
return false;
}
if (isMultiSelect()) {
return ((Set) getValue()).contains(itemId);
} else {
final Object value = getValue();
return itemId.equals(value == null ? getNullSelectionItemId()
: value);
}
}
COM: <s> tests if an item is selected </s>
|
funcom_train/43506921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doShowDialog(SecGroup group) throws InterruptedException {
try {
textbox_AddGroupRightDialog_GroupName.setValue(group.getGrpShortdescription());
textbox_AddGroupRightDialog_RightName.setValue("");
btnCtrl.setInitNew();
addGrouprightDialogWindow.doModal(); // open the dialog in modal
// mode
} catch (Exception e) {
Messagebox.show(e.toString());
}
}
COM: <s> opens the dialog window in modal mode </s>
|
funcom_train/8047433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnableCaret(boolean enableCaret) {
if (this.getFont().getFontCharacterByUnicode("|") != null){
this.enableCaret = enableCaret;
if (enableCaret){
this.caretWidth = 10;
}else{
this.caretWidth = 0;
}
if (this.mode == MODE_EXPAND){
this.setWidthLocal(this.getMaxLineWidth());
}
}else{
System.err.println("Cant enable caret for this textfield, the font doesent include the letter '|'");
}
this.setContentDisplayListDirty(true);
}
COM: <s> sets the enable caret </s>
|
funcom_train/23998759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPicturesAsString(int format) {
switch (format) {
case FORMAT_TXT:
return getPicturesAsString(" ", "\n", false);
case FORMAT_CSV:
return getPicturesAsString(",", "\n", true);
case FORMAT_TXT_OS:
return getPicturesAsString(" ", System
.getProperty("line.separator"), false);
}
return "";
}
COM: <s> gets the picture table in a special format </s>
|
funcom_train/42510181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXStart(Float xStart) {
if (xStart != this.xStart) {
Float oldXStart = this.xStart;
this.xStart = xStart;
this.propertyChangeSupport.firePropertyChange(Property.X_START.name(), oldXStart, xStart);
updateLength();
}
}
COM: <s> sets the edited abscissa of the start point </s>
|
funcom_train/18744963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setConfluent(boolean confluent) {
String result;
// if the new value is false (the default value), remove the key instead
if (!confluent) {
result = (String) remove(CONFLUENT_KEY);
} else {
result = (String) super.setProperty(CONFLUENT_KEY, "" + confluent);
}
if (result == null) {
return false;
} else {
return Boolean.parseBoolean(result);
}
}
COM: <s> sets the confluency status in this property object </s>
|
funcom_train/18894528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTksIsConstraint(String var, Node value) {
if (var == null) {
throw new IllegalArgumentException("'var' is null");
}
if (value == null) {
throw new IllegalArgumentException("'value' is null");
}
return var + TKS_IS + asString(value) + " " + NEWLINE;
}
COM: <s> returns an i tql constraint in the form of var tks is value </s>
|
funcom_train/2271797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getVisibleRange(GameMap map, Point p1, Point p2, double conspicuousness) {
double visibilityPointsLeft = baseVisibility;
Iterator<Point> lineIterator = new LineIterator(p1, p2);
int visibilityCounter = 0;
while (lineIterator.hasNext() && visibilityPointsLeft > 0) {
Terrain terrain = map.getTerrain(lineIterator.next());
visibilityPointsLeft -= (1.0 / getFactor(terrain) / conspicuousness);
if (visibilityPointsLeft >= 0) {
visibilityCounter++;
}
}
return visibilityCounter;
}
COM: <s> calculates the visible range on the given line ranging from </s>
|
funcom_train/23467685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInvokesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ServiceConsumer_invokes_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ServiceConsumer_invokes_feature", "_UI_ServiceConsumer_type"),
ServicePackage.Literals.SERVICE_CONSUMER__INVOKES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the invokes feature </s>
|
funcom_train/39397751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTrustValueSum(Vector<String> identifierStrings, int topX) {
int sum = 0;
Collection<String> ids2SumUp;
if (topX >= identifierStrings.size()) {
ids2SumUp = identifierStrings;
} else {
ids2SumUp = getTopXOf(identifierStrings,topX);
}
for (String curIdentifier : ids2SumUp) {
sum += getTrustValue(curIdentifier);
}
return sum;
}
COM: <s> gets the accumulated trust values of the code top x code most trusted </s>
|
funcom_train/1426668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String guessVersionFromDate() {
if ( guessedVersion == null ) {
final long saveTime_ = saveTime.getTime();
for ( int i = VERSION_RELEASE_DATES.length - 1; i >= 0; i-- )
if ( saveTime_ > VERSION_RELEASE_DATES[ i ] ) {
guessedVersion = VERSION_NAMES[ i ];
break;
}
if ( guessedVersion == null )
guessedVersion = "<unknown>";
}
return guessedVersion;
}
COM: <s> guesses the replay starcraft version from the save date </s>
|
funcom_train/13684835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node map(Node o1, Node o2) {
Node node = new ASTNode(
null, ASTNode.BINARY_OPERATOR_CLASS, "", ((Node)cnodes[1]).getToken(), o1.getScannerInfo());
node.addChild(o1);
node.addChild(new Node(null, opr, o1.getScannerInfo()));
// if (cnodes[1] != null)
// node.addChild((Node)cnodes[1]);
node.addChild(o2);
//FIXME INFIX_RIGHT and INFIX_NON are skipped for now
return node;
}
COM: <s> creates a tree for this operator with an </s>
|
funcom_train/13391387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLocators(LookupLocator[] locators) {
ServiceBeanConfig sbConfig =
service.getServiceBeanContext().getServiceBeanConfig();
sbConfig.setLocators(locators);
try {
service.getServiceBeanContext().getServiceBeanManager().update(sbConfig);
} catch(Exception e) {
logger.log(Level.WARNING,
"Updating ServiceBeanConfig to OperationalStringManager",
e);
}
}
COM: <s> set new lookup locators into the service bean config and update the </s>
|
funcom_train/46728506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeBlankRecords() {
List<FormRecordModel> removeList = new ArrayList<FormRecordModel>();
for (FormRecordModel record : getFormModel().getRecords()) {
if (record.isNew()) {
if (!record.isValueModified() && record.getDetails().size()==0) {
removeList.add(record);
}
}
}
getFormModel().getRecords().removeAll(removeList);
}
COM: <s> remove new records not filled out </s>
|
funcom_train/8436924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJByID() {
System.out.println("jByID");
int id = 56;
Logic l = new Logic("");
l.setModelSize(10);
Model instance = new Model(l);
instance.addSpecificGraph("r1");
int expResult = 6;
int result = instance.jByID(id);
assertEquals(expResult, result);
}
COM: <s> test of j by id method of class nii </s>
|
funcom_train/34593782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getImportXCCDFXsl() {
if (rtProps.getProperty("import.xccdf.xsl.file") == null) {
rtProps.setProperty("import.xccdf.xsl.file", getXslDir() + File.separator + "importXCCDF.xsl");
}
return getInstallDir() + File.separator + rtProps.getProperty("import.xccdf.xsl.file");
}
COM: <s> return the import xccdf xsl </s>
|
funcom_train/51036439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDataSources(final Object[] dataSources) {
if (dataSources == null) {
return;
}
if (IMMEDIATE_ADDREMOVE_DELAY == 0) {
reallyRemoveDataSources(dataSources);
return;
}
try {
dataSourceToRow_mon.enter();
for (int i = 0; i < dataSources.length; i++)
dataSourcesToRemove.add(dataSources[i]);
if (DEBUGADDREMOVE)
debug("Queued " + dataSources.length
+ " dataSources to remove. Total Queued: "
+ dataSourcesToRemove.size());
} finally {
dataSourceToRow_mon.exit();
}
refreshenProcessDataSourcesTimer();
}
COM: <s> remove the specified data source from the table </s>
|
funcom_train/10591719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void read(File file, OutputStream out) throws IOException {
InputStream in = new FileInputStream(file);
byte[] buffer = new byte[8192];
int length = -1;
while ((length = in.read(buffer)) > -1) {
out.write(buffer, 0, length);
}
in.close();
}
COM: <s> reads the given file in the given output stream </s>
|
funcom_train/26013995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getDatabase() {
if (database == null) {
/* This is merely for backwards compatibility with
* versions of FreeTTS earlier than v1.2 (i.e.,
* before the voice manager was introduced).
*/
String name = getFeatures().getString(Voice.DATABASE_NAME);
database = Utilities.getResourceURL(name);
}
return database;
}
COM: <s> gets the url to the database that defines the unit data for this </s>
|
funcom_train/20045335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _getText() {
log.println("Testing getText ...");
XText oFrameText = oObj.getText();
String Content = oFrameText.getString();
tRes.tested( "getText()",Content.equals("The FrameText") );
}
COM: <s> gets the text of the frame </s>
|
funcom_train/8915441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearSearchResultsAndPathEndpoints() {
for(int rowIndex = 0; rowIndex < rows; rowIndex ++) {
for(int columnIndex = 0; columnIndex < columns; columnIndex ++) {
MapCell cell = getMapCell(rowIndex, columnIndex);
cell.setNothingCell();
}
}
this.startCell = null;
this.goalCell = null;
}
COM: <s> clears search results </s>
|
funcom_train/30196997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContinua() throws Exception {
System.out.println("continua");
/*
ActionMapping mapping = null;
ActionForm form = null;
HttpServletRequest request = null;
HttpServletResponse response = null;
ShowAttivitaAction instance = new ShowAttivitaAction();
ActionForward expResult = null;
ActionForward result = instance.continua(mapping, form, request, response);
assertEquals(expResult, result);
*/
}
COM: <s> test of continua method of class com </s>
|
funcom_train/37039176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() throws LifecycleException {
// Validate and update our current state
if (!started)
throw new LifecycleException
(sm.getString("coyoteConnector.notStarted"));
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;
try {
protocolHandler.destroy();
} catch (Exception e) {
throw new LifecycleException
(sm.getString
("coyoteConnector.protocolHandlerDestroyFailed", e));
}
}
COM: <s> terminate processing requests via this connector </s>
|
funcom_train/44011481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTransDate() {
System.out.println("setTransDate");
String transDate = "";
TransactionBO instance = new TransactionBO();
instance.setTransDate(transDate);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set trans date method of class edu </s>
|
funcom_train/45228455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectActiveProject(Project project) {
List<Project> projects = gradeBook.getProjects();
if (!projects.contains(project)) {
throw new IllegalArgumentException("Project [" + project + "] not in data set " +
"of projects");
}
activeProject = project;
fireActiveProjectChangedEvent();
}
COM: <s> indicates the given project is currently being viewed by the user </s>
|
funcom_train/36231209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double cov(ArrayList<Double> X, ArrayList<Double> Y) {
double sum = 0;
for (int i = 0; i < X.size(); i++) {
sum = sum + ((X.get(i)).doubleValue() * (Y.get(i)).doubleValue());
}
return (sum / X.size() - (mean(X) * mean(Y)));
}
COM: <s> calculate the covariance value between both input values </s>
|
funcom_train/17934000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCanvasSize(){
plot2DCanvas.panelSize=new int[] { (int) (getSize().getWidth()+deltaX), (int) (getSize().getHeight()+deltaY)};
plot2DCanvas.setSize(plot2DCanvas.panelSize[0], plot2DCanvas.panelSize[1]);
plot2DCanvas.setPreferredSize(new Dimension(plot2DCanvas.panelSize[0], plot2DCanvas.panelSize[1]));
plot2DCanvas.resetBase();
}
COM: <s> update the jmath tools canvas size </s>
|
funcom_train/47414807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineLabel(String label) {
if(definedLabels.containsKey(label)) {
throw new IllegalStateException("Duplicate definition of label " + label);
}
AddressRecord record = new AddressRecord(getRuntimeAddress(),
getImageAddress());
definedLabels.put(label, record);
}
COM: <s> defines a label at the current runtime address </s>
|
funcom_train/43098701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExit(Object handle, Object value) {
if (handle instanceof MState
&& (value == null || value instanceof MAction)) {
((MState) handle).setExit((MAction) value);
return;
}
throw new IllegalArgumentException("handle: " + handle
+ " or value: " + value);
}
COM: <s> sets the exit action of some state </s>
|
funcom_train/33859762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getAlgorithmStepsResultsSplitPane() {
if (algorithmStepsResultsSplitPane == null) {
algorithmStepsResultsSplitPane = new JSplitPane();
algorithmStepsResultsSplitPane.setDividerSize(3);
algorithmStepsResultsSplitPane.setDividerLocation(30);
algorithmStepsResultsSplitPane.setBottomComponent(getStepsResultsjPanel());
algorithmStepsResultsSplitPane.setTopComponent(getRisultatiDropDownComboBox());
algorithmStepsResultsSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
}
return algorithmStepsResultsSplitPane;
}
COM: <s> this method initializes algorithm steps results split pane </s>
|
funcom_train/48491143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean visitUnspecifiedValueExp(UnspecifiedValueExp<C> uv) {
// unspecified values need not declare a type (it can be OclVoid).
// The only restriction is that they can only be used in message expressions
if (!(uv.eContainer() instanceof MessageExp)) {
String message = OCLMessages.bind(
OCLMessages.IllegalUnspecifiedValueExp_ERROR_,
uv.toString());
return validatorError(uv, message, "visitUnspecifiedValueExp");//$NON-NLS-1$
}
return Boolean.TRUE;
}
COM: <s> callback for an unspecified value exp visit </s>
|
funcom_train/20896120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() {
System.out.println("toString");
Role instance = null;
String expResult = "";
String result = instance.toString();
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 to string method of class it </s>
|
funcom_train/35166214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyNativeResource() {
Util.checkGLError();
if (programId != 0) {
System.err.println("Delete program "+programId);
GL20.glDeleteProgram(programId);
programId = 0;
}
if (fragmentId != 0) {
GL20.glDeleteShader(fragmentId);
fragmentId = 0;
}
if (vertexId != 0) {
GL20.glDeleteShader(vertexId);
vertexId = 0;
}
Util.checkGLError();
}
COM: <s> implements simple native resource </s>
|
funcom_train/39273849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String key, String value) {
if (value != null && Utilities.isBlank(value)) {
//Store null for blank values
if (LOG.isDebugEnabled()) {
LOG.debug("setValue: Storing null for a blank value");
}
value = null;
}
mValues.put(key, value);
}
COM: <s> set the value stored in this object for a given key </s>
|
funcom_train/27834966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ElementData findElement(String name) {
for (int i = 0; i < _elements.size(); i++) {
ElementData toInspect = (ElementData) _elements.elementAt(i);
Component tmp = (Component) toInspect.getComponent();
if (tmp.getName().equals(name)) {
return toInspect;
}
}
return null;
}
COM: <s> returns the element with the given name </s>
|
funcom_train/20125693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void compile(String... options) {
com.sun.tools.javac.main.Main compiler = new com.sun.tools.javac.main.Main("jacob");
// init
Context context = new Context();
DefaultFileManager.preRegister(context);
// compile
int status = compiler.compile(
options,
context,
com.sun.tools.javac.util.List.<JavaFileObject>nil(),
Arrays.<Processor>asList(new Processor[] { this })
);
if (status != 0) {
logger.error("Error processing model!");
}
}
COM: <s> processor compile function initializes and runs java compiler </s>
|
funcom_train/51651589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAdvanced(boolean advanced) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (advanced && data.cairo != 0) return;
if (advanced) {
try {
initCairo();
} catch (SWTException e) {}
} else {
if (!data.disposeCairo) return;
int /*long*/ cairo = data.cairo;
if (cairo != 0) Cairo.cairo_destroy(cairo);
data.cairo = 0;
data.interpolation = SWT.DEFAULT;
data.backgroundPattern = data.foregroundPattern = null;
data.state = 0;
setClipping(0);
}
}
COM: <s> sets the receiver to always use the operating systems advanced graphics </s>
|
funcom_train/33133294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makePropertyOgnl(final Stack propertyStack) {
StringBuffer sb = new StringBuffer();
for (Iterator iter = propertyStack.iterator(); iter.hasNext();) {
String property = (String) iter.next();
sb.append(property);
if (iter.hasNext()) {
sb.append('.');
}
}
return sb.toString();
}
COM: <s> this converts a stack of property names into an ognl expression that </s>
|
funcom_train/44703049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setHelp(String command, PPFHelp ppfHelp) {
if(command == null) {
return;
}
if(ppfHelp == null) {
return;
}
if(help.containsKey(command.toLowerCase())) {
LOG.error("Help command already given: "+ command);
} else {
help.put(command.toLowerCase(), ppfHelp);
}
}
COM: <s> adds online help information for a command in the plugin </s>
|
funcom_train/9389255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProgressMax(int max) {
assert max > 0;
// Always set the dialog's progress max to 10k since it only handles
// integers and we want to have a better inner granularity. Instead
// we use the max to compute a coefficient for inc deltas.
mDialog.setProgressMax((int) MAX_COUNT);
mIncCoef = max > 0 ? MAX_COUNT / max : 0;
assert mIncCoef > 0;
}
COM: <s> sets the max value of the progress bar </s>
|
funcom_train/2853966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void walkAll (Visitor v) {
// DEBUG
// System.out.println("Holder.walkall()");
// END
v.onEntry(this);
if (this instanceof Element)
((Element)this).walkAttrs(v);
nodes.walkAll(v);
v.onExit(this);
}
COM: <s> take a visitor on that walk down the subtrees visiting </s>
|
funcom_train/29694068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void imageComplete(int status) {
if (status == IMAGEERROR || status == IMAGEABORTED) {
consumer.imageComplete(status);
return;
}
// filter everything
rotate();
// done!
consumer.setPixels(0, 0, width, height, ColorModel.getRGBdefault(), raster, 0, width);
consumer.imageComplete(status);
}
COM: <s> heres where we do the work </s>
|
funcom_train/11690577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DoubleMatrix1D assign(DoubleMatrix1D other) {
if (other == this) {
return this;
}
checkSize(other);
if (haveSharedCells(other)) {
other = other.copy();
}
for (int i = size; --i >= 0;) {
setQuick(i, other.getQuick(i));
}
return this;
}
COM: <s> replaces all cell values of the receiver with the values of another matrix </s>
|
funcom_train/14306448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMoveButtonsEnabled(boolean enabled) {
if(enabled == true && moveButtonsEnabled == false) {
moveButtonsEnabled = true;
btnPanel.add(moveUp);
btnPanel.add(moveDown);
}
else if(enabled == false && moveButtonsEnabled == true) {
moveButtonsEnabled = false;
btnPanel.remove(moveDown);
btnPanel.remove(moveUp);
}
}
COM: <s> enable or disable the move buttons </s>
|
funcom_train/41548425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderRowStart(UIComponent table, ResponseWriter writer) throws IOException {
TableMetaInfo info = getMetaInfo(table);
writer.startElement("tr", table);
if (info.rowClasses.length > 0) {
writer.writeAttribute("class", info.getCurrentRowClass(), "rowClasses");
}
writer.writeText("\n", table, null);
}
COM: <s> renders the starting code tr code element applying any values from </s>
|
funcom_train/16482542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaults() {
values.clear();
for(int i=0; i<DEFAULT_SYMPTHOMS_LIST.length; i++) {
names[i] = DEFAULT_SYMPTHOMS_LIST[i];
Vector<String> sympthomValues = new Vector<String>();
if(i<DEFAULT_SYMPTHOMS_LIST_LEVELS.length) {
for(int j = 0; j<DEFAULT_SYMPTHOMS_LIST_LEVELS[i].length; j++) {
sympthomValues.add(DEFAULT_SYMPTHOMS_LIST_LEVELS[i][j]);
}
}
values.add(sympthomValues);
}
}
COM: <s> sets the default values to the sympthoms list </s>
|
funcom_train/16768117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object decode(ProtocolState state, IoBuffer in) throws ProtocolException {
int start = in.position();
log.debug("Start: {}", start);
try {
final RTMP rtmp = (RTMP) state;
switch (rtmp.getState()) {
case RTMP.STATE_CONNECTED:
return decodePacket(rtmp, in);
case RTMP.STATE_CONNECT:
case RTMP.STATE_HANDSHAKE:
return decodeHandshake(rtmp, in);
case RTMP.STATE_ERROR:
// attempt to correct error
default:
return null;
}
} catch (ProtocolException pe) {
// Raise to caller unmodified
throw pe;
} catch (RuntimeException e) {
throw new ProtocolException("Error during decoding", e);
}
}
COM: <s> decodes the buffer data </s>
|
funcom_train/51119614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveComponentsFrom(ComponentContainer source) {
for (Iterator i = source.getComponentIterator(); i.hasNext();) {
Component c = (Component) i.next();
String caption = null;
Resource icon = null;
if (TabSheet.class.isAssignableFrom(source.getClass())) {
caption = ((TabSheet) source).getTabCaption(c);
icon = ((TabSheet) source).getTabIcon(c);
}
source.removeComponent(c);
addTab(c, caption, icon);
}
}
COM: <s> move all components from another container to this container </s>
|
funcom_train/3939557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convert(String str, boolean html) {
if (html) {
str = convertHTML(str);
}
str = cp1252ToHex(str);
for (int i = 0; i < VPS_char.length; i++) {
str = str.replace(VPS_char[i], Unicode_char[i]);
}
return str;
}
COM: <s> converts vps to unicode </s>
|
funcom_train/48332719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRunnable () {
if (threadData.suspendCount != 0)
return false;
switch (threadData.state) {
case RUNNING:
case UNBLOCKED:
return true;
case SLEEPING:
return true; // that's arguable, but since we don't model time we treat it like runnable
case TIMEDOUT:
return true; // would have been set to blocked if it couldn't reacquire the lock
default:
return false;
}
}
COM: <s> returns true if this thread is either running or unblocked </s>
|
funcom_train/31403901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printTargetClassLink(ClassDoc cd, String target) {
String filename = cd.name() + ".html";
printTargetHyperLink(filename, target,
(cd.isInterface() || cd.isAbstract())? //new
italicsText(cd.name()): cd.name());
}
COM: <s> print class link with target frame </s>
|
funcom_train/19243004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoom(int factor) {
if(factor <= 0) {
System.err.println("--ERROR-- zoom(" + factor + "), " + factor + " is out of range. Try a number greater than 0.");
return;
}
scr.zoom(factor);
pack();
flush();
}
COM: <s> sets the zoom factor </s>
|
funcom_train/25872205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerController(String beanName, Class beanClass) {
String urlPath = generatePathMapping(beanClass);
if (logger.isDebugEnabled()) {
logger.debug("Registering Controller '" + beanName
+ "' as handler for URL path [" + urlPath + "]");
}
registerHandler(urlPath, beanName);
}
COM: <s> register the controller with the given name as defined </s>
|
funcom_train/45079082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringBuffer getLevelString (){
if(level >= 1){
StringBuffer ret = new StringBuffer ();
for(int i = 0; i < (level -1); i++){
ret.append (" ");
}
return ret.append (RELSHIP_IDENTIFIER);
}
else{
return new StringBuffer ();
}
}
COM: <s> returns the appropriate level string as string buffer for further concatenation </s>
|
funcom_train/45389790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close(InputStream is) {
try {
if (is != null) {
is.close();
is = null;
}
} catch (Exception ex) {
//#if DEBUG==1
logger.print("CONNECT",Logger.ERROR, "Connect::close: " + ex.toString(),ex);
//#endif
}
}
COM: <s> method close description </s>
|
funcom_train/34897998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleRequest(Request request, IRequestErrorHandler errorHandler) {
if (request instanceof TargetFeatureAnnotationRequest)
handleFeatureAnnotationRequest((TargetFeatureAnnotationRequest)request, errorHandler);
else if (request instanceof TargetFeatureAnnotationResultRequest)
handleFeatureAnnotationResultRequest((TargetFeatureAnnotationResultRequest)request, errorHandler);
else if (request instanceof IPIRequest)
handleFeatureAnnotationBroadcastRequest((IPIRequest)request, errorHandler);
else
errorHandler.handleRequestFailed(new CorraException(getErrorMessage()));
}
COM: <s> handles request to run target feature annotation on a project </s>
|
funcom_train/14420469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Figure object) {
if (objectStack == null)
objectStack = new Figure[ContainerFigure.INITIAL_ARRAY_SIZE];
else if (objectStack.length <= nextIndex) {
Figure[] newObjectStack = new Figure[objectStack.length * 2];
System.arraycopy(objectStack, 0, newObjectStack, 0, objectStack.length);
objectStack = newObjectStack;
}
objectStack[nextIndex] = object;
++nextIndex;
}
COM: <s> adds an object to the container for later drawing </s>
|
funcom_train/18191440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addBefore(E entry, E before) throws DoublyLinkedListErrorException {
DoublyLinkedListEntry.Finger pos = before.getDoublyLinkedListFinger().getFinger(this);
if(pos == null || (pos.next == null && pos.previous == null)) {
throw new DoublyLinkedListErrorException("Cannot add an element into doubly linked list before an element which is not contained in the list.");
}
return addBefore(entry, pos);
}
COM: <s> adds an entry before another entry already in the list </s>
|
funcom_train/13211167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showProfilesDialog() {
GameDialogs dlg = GameDialogFactory.getInstance().createGameDialogs();
PlayerProfiles profiles = PlayerProfiles.getInstance();
if (profiles.isRememberProfiles()) {
dlg.showPlayerProfilesDialog((MainFrame)getMainFrame(), profiles);
} else HGBaseLog.logError("No valid path at fileProfile setting!");
}
COM: <s> shows the dialog for managing profiles </s>
|
funcom_train/4047468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadProblemProperties(String source) {
try {
problemProperties.load(new StringReader(source));
} catch (IOException e) {
throw new IllegalArgumentException(String.format("Unable to parse meta for problem %s of contest %d",
taskId, contestId), e);
}
}
COM: <s> parse properties from string </s>
|
funcom_train/42951152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BitSet PermuteCInv(BitSet C) {
// un permute
BitSet P = new BitSet(32);
for (int i = 0; i < 32; i++) {
P.set(i, C.get(C_PERM_INV[i] - 1));
}
return P;
}
COM: <s> inverse of the c permutation above </s>
|
funcom_train/34421016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onChangeSelection(ValueChangeEvent v) {
Object newValue = v.getNewValue();
if (newValue == null)
newValue = "";
String sID = v.getComponent().getId();
if ("bereich_id".equals(sID))
this.setProject(newValue.toString());
if ("process_id".equals(sID))
this.setProcess(newValue.toString());
row = 0;
loadIssueList();
}
COM: <s> change selection widgets form search page </s>
|
funcom_train/32118312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String tryDecodeBufferWithCharset(ByteBuffer content, Charset cs) {
CharBuffer buffer = CharBuffer.allocate(content.capacity() * 2);
CharsetDecoder decoder = createDecoder(cs);
content.rewind();
CoderResult coderRes = decoder.decode(content, buffer, true);
if (coderRes.isError() == false) {
buffer.rewind();
return buffer.toString().trim();
}
return null;
}
COM: <s> try to decode a byte buffer with a charset </s>
|
funcom_train/37838378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeLeft(final Expression prec, final boolean mergeNormalized) {
original = prec.getOriginal() + ' ' + original;
if (mergeNormalized) {
normalized = prec.getNormalized() + ' ' + normalized;
}
mergeType(prec.getType());
setAmount(mergeAmount(prec.amount, amount));
}
COM: <s> merge the given preceding expression into this expression while leaving main word unchanged </s>
|
funcom_train/24121586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(InputStream in) throws IOException {
// Size and type have already been read
this.yDenom = WMFConstants.readLittleEndianShort(in);
this.yNum = WMFConstants.readLittleEndianShort(in);
this.xDenom = WMFConstants.readLittleEndianShort(in);
this.xNum = WMFConstants.readLittleEndianShort(in);
}
COM: <s> reads the content of a scale viewport ext record from a stream </s>
|
funcom_train/922986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadDocContentsByHTML(String htmlString, boolean isAddedToHistory) {
synchronized(docContentEditorPane) {
docContentEditorPane.setText(htmlString);
}
//System.out.println(htmlString);
//add the page to t he visiting history
URLOrHTMLString page = new URLOrHTMLString();
page.setType(IndexTocPanelEvent.CONTENTS_BY_HTML);
page.setHtmlString(htmlString);
if (isAddedToHistory)
addVisitHistory(page);
}
COM: <s> load the page by html string to list the choices </s>
|
funcom_train/23385291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printError(String msg,PrintWriter out){
out.print("<center><div class=error>"+msg+"<br/><form onsubmit=\"javascript:back()\"><input type=submit onlick=\"javascript:back()\" value=\"Zurück\" /></form></div></center>");
}
COM: <s> print a error msg to out </s>
|
funcom_train/2862048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteChild(VTree child) {
if (children == child)
{
children = child.siblings;
if (tail == child)
tail = null;
}
else
{
for (VTree sib = children; sib != null; sib = sib.siblings)
if (sib.siblings == child)
{
if (tail == child)
tail = sib;
sib.siblings = child.siblings;
break;
}
}
child.parent = null;
child.siblings = null;
}
COM: <s> delete a child from a node </s>
|
funcom_train/47105021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getScenarioMessage(){
String message;
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
Document dom;
try {
DocumentBuilder db = dbf.newDocumentBuilder();
dom = db.parse(ScenarioFile.getInstance().getStream(src.Constants.SCENARIO_INFO));
message = dom.getDocumentElement().getElementsByTagName(
"message").item(0).getFirstChild().getNodeValue();
return message;
}catch(Exception e) {
return "";
}
}
COM: <s> gets the message about the scenario from the scenario info file </s>
|
funcom_train/27960587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
if (cachedHashCode != 0) return cachedHashCode;
/* compute the hash code using a local variable such that we're
reentrant */
int hashCode = 0;
for (int i = 0; i < count; i++)
hashCode = hashCode * 31 + value[i];
cachedHashCode = hashCode;
return hashCode;
}
COM: <s> computes the hashcode for this string according to jls appendix d </s>
|
funcom_train/7857343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String basename(String fileName) {
int start = fileName.lastIndexOf(FSEP) + 1; // last '/'
int end = fileName.lastIndexOf("."); // last '.'
if (end == 0) {
end = fileName.length();
}
return fileName.substring(start, end);
}
COM: <s> returns the file name excluding directories and extension </s>
|
funcom_train/51483338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawAll(Graphics g) {
boolean isPrinting = (g instanceof PrintGraphics);
drawBackground(g);
if (fBackgrounds != null && !isPrinting)
drawPainters(g, fBackgrounds);
drawDrawing(g, showGuides);
if (fForegrounds != null && !isPrinting)
drawPainters(g, fForegrounds);
if (!isPrinting)
drawHandles(g);
}
COM: <s> draws the contents of the drawing view </s>
|
funcom_train/18243424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent pEvent) {
// System.out.println("I think the LAF has changed, recomputing quality colors & issuing repaint");
this.initializeQualityColors();
// The repaint is unnecessary given the order of events here:
// we're getting this notification long before the UI tree has
// been updated.
// this.repaint();
}
COM: <s> code property change listener code method to receive </s>
|
funcom_train/17204850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer s = new StringBuffer();
s.append("Emitter Set of:\n");
Iterator<EmitterDescriptor> i = emitters.iterator();
while (i.hasNext())
s.append(i.next().toString() + "\n");
s.append("-------------\n");
return s.toString();
}
COM: <s> print this emitter set readably </s>
|
funcom_train/17385368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean verify() {
int accum = 3;
cdkey = cdkey.toLowerCase();
for(int i = 0; i < (cdkey.length() - 1); i++)
accum += ((cdkey.charAt(i) - '0') ^ (accum * 2));
return ((accum % 10) == (cdkey.charAt(12) - '0'));
}
COM: <s> verifies that the cdkey is valid </s>
|
funcom_train/38575839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionSet getValidActions(final State state) {
if( filter == null )
return this;
ActionSet valid = new ActionSet();
for(int i=0; i<this.size(); i++){
final Action action = this.get(i);
if( filter.isPermitted(state, action) ){
valid.add(action);
}
}
return valid;
}
COM: <s> returns a new action set that holds only actions valid in the </s>
|
funcom_train/12213955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageIcon createImageIcon(String iname, String label) {
iname = Gide.PATHIMAGE + iname + ".gif";
File fimage = new File(iname);
if (!fimage.isFile()) {
System.err.println(Gide.rnotfound + ": " + iname);
return null;
} else {
return new ImageIcon(iname, label);
}
}
COM: <s> create an icon from image </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.