__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/20818434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processZFunction (ZFunction zfunc) {
if (columns != zfunc.size()){
System.err.println ("Size of zfunction doesn't equal to number of columns in TableData");
}
for (int i = 0; i < columns; i++){
data[0][i] = new Number (zfunc.getCoeffAt (i));
}
data[0][columns] = new Number();
}
COM: <s> populate section associated with the z function </s>
|
funcom_train/17771157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double nrOfItemsFromClassInCluster(int classNr, ClusteringResult expRes){
int aantal = 0;
Cluster c = expRes.getCluster(classNr);
Iterator<Integer> iter = cluster.iterator();
while(iter.hasNext()){
if(c.cluster.contains(iter.next()))
aantal++;
}
return (1.0*aantal)/cluster.size();
}
COM: <s> number of docs in cluster l that are of a specific class </s>
|
funcom_train/9924859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long skipBits(long n) throws IOException
{ if (n < 0) throw new IllegalArgumentException();
long wholeBytes = (n - resLen) / 8;
long ret = in.skip(wholeBytes) * 8;
n -= wholeBytes * 8;
readBits((int)n);
return ret + n;
}
COM: <s> skips some bits of input </s>
|
funcom_train/34135033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchVertex(Vertex v) {
//update neighbors of v
for (Vertex n : getNeighbors(v)) {
if (partitioning.compare(v, n)) {
n.neighbourMoved(true);
}
else {
n.neighbourMoved(false);
}
}
//update partition score
partitioning.setScore(partitioning.getScore() - v.getGain());
//update v
v.swap();
if (partitioning.getPartition(v) == 0) {
partitionA.remove(v);
partitionB.add(v);
partitioning.setPartition(v, 1);
}
else {
partitionB.remove(v);
partitionA.add(v);
partitioning.setPartition(v, 0);
}
}
COM: <s> change the current partition for given vertex v </s>
|
funcom_train/5522770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testComment() {
System.out.println();
log.info("testComment");
X3dCanonicalizer.main(new String[] {testFilesDir + "TestComment.x3d"});
X3dToolsXMLUnitTest.main(new String[] {testFilesDir + "TestComment.x3d",
testFilesDir + "TestCommentCanonical.x3d"});
}
COM: <s> test of correct processing of comments contained in scenes </s>
|
funcom_train/511196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("[ Options: [ short ");
buf.append(shortOpts.toString());
buf.append(" ] [ long ");
buf.append(longOpts);
buf.append(" ]");
return buf.toString();
}
COM: <s> p dump state suitable for debugging </s>
|
funcom_train/47314102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getLoadButton() {
if (loadButton == null) {
loadButton = new JButton();
loadButton.setText(localization.getProperty("loc-EditorTab-loadButton"));
loadButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
loadProperties();
}
});
}
return loadButton;
}
COM: <s> this method initializes load button </s>
|
funcom_train/48749225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDouble(int fieldNum) throws DBException {
String myName = new String(thisClass + "getDouble(int)");
try {
return myResultSet.getDouble(fieldNum);
} catch(SQLException se) {
throw new DBException(myName + ":Error fetching double field "
+ fieldNum + " (" + myDescription + ")", se.getMessage());
}
} /* getDouble(int) */
COM: <s> fetch the given field of the current row as a double </s>
|
funcom_train/10211079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCache(mxCellState state) {
Polygon2D polygon = getParent().getBasicShape();
Rectangle2D boundsOnGraph = getParent().canvasBounds(state);
offset = new Point2D.Double(boundsOnGraph.getX() - polygon.getBounds2D().getMinX(), boundsOnGraph.getY()
- polygon.getBounds2D().getMinY());
scaledPolygon = getParent().getScaledShape();
}
COM: <s> updates all the cached values </s>
|
funcom_train/1059976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWaypointsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GraphEdge_waypoints_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GraphEdge_waypoints_feature", "_UI_GraphEdge_type"),
Di2Package.Literals.GRAPH_EDGE__WAYPOINTS,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the waypoints feature </s>
|
funcom_train/34314435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWeightsDecayRegularization(double weightsDecayCost) {
if (weightsDecayCost <= 0 || weightsDecayCost > 1) {
throw new IllegalArgumentException("The weights decay regularization cost " +
"term must be greater than 0 and no more than 1. " +
"The passed value is : " + weightsDecayCost);
}
this.weightsDecayCost = weightsDecayCost;
}
COM: <s> sets the regularization cost term for weights decay </s>
|
funcom_train/22370904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTextField getTextFieldEditor(TextTagAttribute attribute) {
JComponent c = controls.get(attribute).getEditor();
if (c instanceof JTextField) {
return (JTextField) c;
} else {
throw new IllegalArgumentException(StringUtils.getString(attribute.toString(), " editor is not a JTextField"));
}
}
COM: <s> text field editor for attribute </s>
|
funcom_train/1208086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String resetPasswordWithKey(String username, String emailKey, String newPassword) {
try {
usersService.resetPasswordWithKey(username, emailKey, newPassword);
return "Password changed successfully, please login with your new password";
} catch (ServiceRuntimeException se) {
log.error(se);
throw se;
} catch (Exception e) {
log.error(e);
throw new ServiceRuntimeException(ERROR_MESSAGE);
}
}
COM: <s> second step in forgot password </s>
|
funcom_train/15719766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics g, int x, int y) {
if( g == null ) return;
if(component == null ) angle = 0;
if(angle == 0 ) super.draw(g,x,y);
else draw(component,g,x,y);
}
COM: <s> parse the text then draw it </s>
|
funcom_train/44936612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clear(Connection connection, int id) throws SQLException {
PreparedStatement ps = connection.prepareStatement("DELETE FROM "
+ tableName + " WHERE id=?");
try {
ps.setInt(1, id);
ps.executeUpdate();
} finally {
ps.close();
}
}
COM: <s> removes all records with specified id </s>
|
funcom_train/14653861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProcedure(String procedure_name, String initial_activation) {
try {
procedure = new ProcedureChunk(procedure_name,
ChunkTypeConstants.PROCEDURE, Double
.parseDouble(initial_activation), true);
procedureMap.addChunk(procedure);
System.out.println("procedure" + procedure);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> add procedure to memorymap </s>
|
funcom_train/50763014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object fetchValue(Object target, String methodName, Object[] args) {
Map<CacheRecord, Object> cache = objectCache.get(target);
if (cache == null) {
return null;
}
CacheRecord rec = new CacheRecord(methodName, args);
if (cache.containsKey(rec)) { // Yes....
Object result = cache.get(rec);
if (debug) {
debugPrint("Cached result for argument value: "
+ Arrays.toString(rec.args) + ": " + result);
}
return result;
}
return null;
}
COM: <s> fetch a cached result returns null when no cache entry was available </s>
|
funcom_train/3312859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File file){
if(alternative == null)
return(file.isDirectory() ||
file.getName().toLowerCase().endsWith(extension));
else
return(file.isDirectory() ||
file.getName().toLowerCase().endsWith(extension) ||
file.getName().toLowerCase().endsWith(alternative));
}
COM: <s> this method returns true when the file is accepted by the extension filter </s>
|
funcom_train/2572955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String plugin, String id, String key) {
if(id == null) id = ""; else id = "("+id+")";
String result = getProperty(plugin+id, key);
if(result == null)
result = getProperty(plugin, key);
return result;
}
COM: <s> get property value for a certain plugin with the specified id </s>
|
funcom_train/49790555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSettingMapAddress() throws Exception {
beginAtSitemapThenPage("Home");
IElement map = assertHasMap("containing map");
{
String target = getLabelIDForText("address");
assertLabeledFieldEquals(target, "");
setLabeledFormElementField(target, "Wellington, New Zealand");
}
// nothing has changed yet
assertHasNoMapPoint(map, "target point");
assertNoProblem();
}
COM: <s> we change the address but dont call submit </s>
|
funcom_train/3174745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String setSelectedPrefix(String prefix) {
// try to find a match
for (int i=0;i<values.length;i++) {
String value = values[i].toString();
if (value.regionMatches(isIgnoreCase, 0, prefix, 0, prefix.length())) {
setSelectedItem(value);
return value;
}
}
// no match
return "";
}
COM: <s> selects an item by prefix </s>
|
funcom_train/12639388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void engineSetParameter(String key, Object param) {
if (key.equals("KSEED")) {
if (param instanceof byte[]) {
Kseed = byteArray2IntArray((byte[])param);
KseedAsByteArray = (byte[])param;
} else {
debug("unrecognized param: " + key);
throw new InvalidParameterException("Kseed not a byte array");
}
} else {
throw new InvalidParameterException("invalid parameter");
}
}
COM: <s> this implementation recognizes the following parameter dl </s>
|
funcom_train/3703102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel createTopPanel() {
JPanel p = new JPanel();
p.setLayout(new BorderLayout());
//// 1. Create the table.
table = new LogHistoryTable(history);
//// 2. Add the table.
p.add(new JScrollPane(table));
//// 3. Return.
return (p);
} // of method
COM: <s> create the top </s>
|
funcom_train/7335795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMembersByGroup(Map<Integer, InfoBean> members, Integer groupId, InfoAccess infoaccess) {
String filter = TableGroupsMembers.F_GROUP + "=" + groupId;
Collection<InfoBean> coll = infoaccess.query(TableGroupsMembers.NAME, filter, null, true);
for (InfoBean groupsMembers : coll) {
InfoBean member = groupsMembers.getOneRelation(TableGroupsMembers.F_MEMBER);
members.put((Integer) member.getId(), member);
}
}
COM: <s> add members of the given group </s>
|
funcom_train/44572115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMember( JmlSourceField group, CField member ) {
if ( ! group.isDataGroup() ) {
System.err.println("The field " + group.ident()
+ " is not a data group");
return;
}
group = group.getMostRefined();
if ( !memberMap.containsKey(group) ) {
addGroup(group);
addMember(group, member);
}
JmlAssignableFieldSet fldSet = getMembers(group);
fldSet.add(member);
}
COM: <s> add code member code to the member set of code group code </s>
|
funcom_train/5812780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeNewRangeIntoDef(final Range newRange) {
purgeEclipsedRangesInDef(newRange);
if (getConfigDef().getRangeCount() == 0) {
getConfigDef().addRange(newRange);
} else {
boolean overlapped = mergeOverlappingRanges(newRange);
if(!overlapped) {
getConfigDef().addRange(newRange);
}
}
}
COM: <s> responsible for merging new ranges in to this definition </s>
|
funcom_train/33517355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matchesRowFamily(HStoreKey that) {
int delimiterIndex = getFamilyDelimiterIndex(getColumn());
return equalsTwoRowKeys(getHRegionInfo(), getRow(), that.getRow()) &&
Bytes.compareTo(getColumn(), 0, delimiterIndex, that.getColumn(), 0,
delimiterIndex) == 0;
}
COM: <s> compares the row and column family of two keys </s>
|
funcom_train/27748325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRectangle(int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0) {
x = x + width;
width = -width;
}
if (height < 0) {
y = y + height;
height = -height;
}
OS.gdk_draw_rectangle(data.drawable, handle, 0, x, y, width, height);
}
COM: <s> draws the outline of the rectangle specified by the arguments </s>
|
funcom_train/39138822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void tearDown() throws Exception {
super.tearDown();
// clean up the job manager registry
sLog.info("tearing down JobManager");
Thread.sleep(5000);
((JobManagerMBean) oJobManager).shutdown();
Thread.sleep(2000);
org.hsqldb.DatabaseManager.closeDatabases(0);
oJobManager = null;
}
COM: <s> tear down the fixture </s>
|
funcom_train/39294993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPackagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BusinessElement_package_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BusinessElement_package_feature", "_UI_BusinessElement_type"),
BmldataPackage.eINSTANCE.getBusinessElement_Package(),
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the package feature </s>
|
funcom_train/8497675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void harvestDoc(int infosourceId, File rawFile) throws Exception {
byte[] content = null;
String path = rawFile.getAbsolutePath();
String url = null;
String contentAsString = FileUtils.readFileToString(rawFile);
if(contentAsString!=null){
url = getGuidFromRawFile(contentAsString);
content = contentAsString.getBytes();
} else {
logger.info("NULL " + path);
}
// }
COM: <s> harvest a document and update the repository </s>
|
funcom_train/23278657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validate(Contact contact) {
if(contact==null || contact.getFirstName()==null || contact.getLastName()==null ||
contact.getFirstName().trim().length()==0 || contact.getLastName().trim().length()==0)
return false;
return true;
}
COM: <s> validates the given contact </s>
|
funcom_train/15490462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
ImageWindow win = getWindow();
if (win!=null) {
//if (IJ.isWindows() && IJ.isJava14())
// changes = false; // avoid 'save changes?' dialog and potential Java 1.5 deadlocks
win.close();
} else {
if (WindowManager.getCurrentImage()==this)
WindowManager.setTempCurrentImage(null);
killRoi(); //save any ROI so it can be restored later
Interpreter.removeBatchModeImage(this);
}
}
COM: <s> closes this image and sets the pixel arrays to null </s>
|
funcom_train/37833095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void diogenes() {
final SpeakerNPC npc = npcs.get("Diogenes");
npc.add(
ConversationStates.IDLE,
ConversationPhrases.GREETING_MESSAGES,
new GreetingMatchesNameCondition(npc.getName()),
ConversationStates.ATTENDING,
"Greetings. I expect you are wondering what strange things are happening here?",
null);
npc.addReply(ConversationPhrases.YES_MESSAGES,
"So am I, my friend. I expect young Carmen will tell you something.");
npc.addReply(ConversationPhrases.NO_MESSAGES,
"Ah, the folly of youth! You do not look around you with open eyes until it is too late.");
}
COM: <s> makes diogenes tell you to ask carmen whats happening </s>
|
funcom_train/35530317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Logger getLogger(String name) {
Logger logger = Logger.getLogger(name);
logger.setLevel( logLevel );
try
{
FileAppender appender = new FileAppender (new PatternLayout(logPattern), logDir + "/" + name + ".log", true);
logger.addAppender (appender);
logger.info("Logging initialized.");
}
catch(IOException e)
{
throw new ServerRuntimeException("Unable to load file " + logDir + "/" + name + ".log",e);
}
return logger;
}
COM: <s> returns logger writing to file with specified name </s>
|
funcom_train/46719072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readOpfFromStream ( InputStream stream ) throws EpubFormatException, IOException {
XmlUtility xmlu = XmlUtility.getInstance();
// read document from file
Document inputDoc;
try {
inputDoc = xmlu.readXml(stream);
} catch (SAXException e) {
throw new EpubFormatException ("error while parsing OPF file",e);
}
// fill object structure from DOM tree
readFromXmlDocument(inputDoc);
}
COM: <s> read the opf package file i </s>
|
funcom_train/19234511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Message msg;
// Loop until stream is closed
do {
// Wait for next msg
try {
msg = recvMsgFromDevice();
} catch (Exception e){
if(debugMode) System.out.print(e.getMessage());
msg = null;
}
} while(msg != null);
}
COM: <s> receiver thread for realtime tracking </s>
|
funcom_train/15891950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildShape() {
if(grappaNexus == null) {
grappaNexus = new GrappaNexus(this);
Attribute attr = null;
Enumeration enumer = listAttrsOfInterest();
while(enumer.hasMoreElements()) {
attr = getAttribute((String)enumer.nextElement());
if(attr != null) {
attr.addObserver(grappaNexus);
}
}
}
if(grappaNexus == null) {
throw new InternalError("grappaNexus did not get created");
}
}
COM: <s> creates and populates the grappa nexus object for this element </s>
|
funcom_train/5392034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
try {
Configuration config = createXindiceConfiguration();
String dbName = config.getAttribute(org.apache.xindice.core.Database.NAME, "");
Database db = Database.getDatabase(dbName);
db.close();
} catch (IOException e) {
log.error(e);
throw new XMLDBStartupException(e.getMessage(),e);
} catch (XindiceException e) {
log.error(e);
throw new XMLDBStartupException(e.getMessage(),e);
}
}
COM: <s> shutdown this xindice embedded database </s>
|
funcom_train/50331246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFeedbackEncoderMsgAddr() {
if (this.isFeedbackMessage()) {
int a1 = this.getElement(1);
int messagetype=this.getFeedbackMessageType();
if ( messagetype == 2 )
{
// This is a feedback encoder message
int address=(a1 & 0xff);
return(address);
} else return -1;
} else return -1;
}
COM: <s> if this is a feedback response message for a feedback encoder </s>
|
funcom_train/26382737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void receiveAuth(YahooPacket packet) {
DEBUG.p("Packet Dump: " + packet.toString());
String[] pBody = packet.getBodyAsStringArray();
DEBUG.p("Packet Body Part 4 is: '" + pBody[3] + "'");
CRAM cram = new CRAM(username, password, pBody[3]);
String[] response = cram.getResponseStrings();
this.sessionID = packet.getSessionID();
sendAuthResp(response[0], response[1]);
}
COM: <s> this packet is sent by yahoo in response to our initial packet </s>
|
funcom_train/18747760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAndNot(GraphCondition condition) {
if (condition instanceof EdgeEmbargo) {
addNegation(((EdgeEmbargo) condition).getEmbargoEdge());
} else if (condition instanceof MergeEmbargo) {
Set<? extends Node> injection = condition.getPattern().elementMap().nodeMap().keySet();
addInjection(injection);
} else {
addComplexNegCondition(condition);
}
}
COM: <s> if the condition is an edge embargo calls </s>
|
funcom_train/3289403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean supportsType( MimeType mimeType ) {
if ( (!MimeType.HTML.equals( mimeType )) &&
(!MimeType.WML.equals( mimeType )) ){
return false;
}
// Call of the same method of control's portlet
return getPortlet().supportsType( mimeType );
}
COM: <s> method checks whether the requested mime typ is supported by this control </s>
|
funcom_train/21996727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRootMessage() {
Throwable last_cause = this;
Throwable cause = this;
while (cause != null) {
if (cause instanceof JRecException) {
cause = ((JRecException)cause).getRootCause();
if (cause != null)
last_cause = cause;
}
else
cause = null;
}
return last_cause.getMessage();
}
COM: <s> returns the single base error message string of this throwable object </s>
|
funcom_train/50313566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection(boolean selected) {
checkWidget();
if((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
if((style & SWT.CHECK) != 0)
Fox.FXMenuCheck_setCheck(handle, selected? 1: 0);
else
Fox.FXMenuRadio_setCheck(handle, selected? 1: 0);
}
COM: <s> sets the selection state of the receiver </s>
|
funcom_train/33778854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invokeUpdateActions() {
RegisteredAction updateAction;
for (Iterator<RegisteredAction> i = updateActions.iterator(); i.hasNext();) {
updateAction = i.next();
updateAction.invoke(new Object[] { new PointInTime(startPoint, p.frameCount) });
}
}
COM: <s> invokes the update actions </s>
|
funcom_train/39467528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showQuestionDialog(final Component parentComponent, final String key, final Object... args) {
return showConfirmDialog(parentComponent, JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, key, args) == JOptionPane.YES_OPTION;
}
COM: <s> show a localized question dialog </s>
|
funcom_train/13364901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Composite getComposite(final Group group, final int columns) {
final Composite composite = new Composite(group, SWT.NONE);
composite.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
composite.setLayout(new GridLayout(columns, false));
return composite;
}
COM: <s> gets a composite inside a specified group </s>
|
funcom_train/31156668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMenuBar() {
JMenuBar menuBar = new JMenuBar();
menuBar.add(createFileMenu());
menuBar.add(createZoomMenu());
menuBar.add(createToolsMenu());
menuBar.add(createEditMenu());
menuBar.add(createHelpMenu());
setJMenuBar(menuBar);
}
COM: <s> creates the menu bar </s>
|
funcom_train/45539539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor getJSCImageDescriptor(IJSCElement element, int flags) {
Point size= useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE;
ImageDescriptor baseDesc= getBaseImageDescriptor(element, flags);
if (baseDesc != null) {
int adornmentFlags= computeJSCAdornmentFlags(element, flags);
return new JSCElementImageDescriptor(baseDesc, adornmentFlags, size);
}
return new JSCElementImageDescriptor(JSCPluginImages.DESC_OBJS_GHOST, 0, size);
}
COM: <s> returns an image descriptor for a java element </s>
|
funcom_train/5811290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSnmpConfig() throws IOException {
return ConfigurationTestUtils.getConfigForResourceWithReplacements(this, "/org/opennms/netmgt/mock/snmp-config.xml",
new String[] { "@myVersion@", myVersion() },
new String[] { "@myLocalHost@", myLocalHost() }
);
}
COM: <s> string representing snmp config </s>
|
funcom_train/21612758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJPathOperation() throws InterpreterException {
String predicate = "JPath( List(1,2,Map('a',10,'b',20)), '[2].b' );";
Value result = interpreter.process(predicate);
System.out.println("Result: " + result.asString().getNativeValue());
checkResult( 20, result );
}
COM: <s> tests the i jpath i operation </s>
|
funcom_train/37079766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean idAndNameInconsistent() {
// if name and id in same format, should be identical
AnnotatedFeatureI af = getEditedFeature();
if (!getNameAdapter().idAndNameHaveSameFormat(af,getGuiId(),getGuiName()))
return false; // not same format - cant be inconsistent
return !getGuiId().equals(getGuiName());
}
COM: <s> returns true if name and id have same format but are unequal </s>
|
funcom_train/38595864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
buf.append( INCLUDE_LEADING_ZEROS_3.format( part1 ) );
buf.append( "-" );
buf.append( INCLUDE_LEADING_ZEROS_2.format( part2 ) );
buf.append( "-" );
buf.append( INCLUDE_LEADING_ZEROS_4.format( part3 ) );
return buf.toString();
}
COM: <s> return the phone number as a formatted string </s>
|
funcom_train/32068900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDocumentAttachments(Collection<DocumentAttachment> documentAttachments) {
boolean addOk = getDocumentAttachments().addAll(documentAttachments);
if (addOk) {
for(DocumentAttachment documentAttachment : documentAttachments) {
documentAttachment.setGroup((DocumentAttachmentGroup)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed document attachments collection to the group collection </s>
|
funcom_train/37081756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertIntoTabbedPane(JTabbedPane pane,int index) {
pane.insertTab(getName(),null,getPanel(),getToolTip(),index);
if (!colorScheme.equalsIgnoreCase("gray"))
pane.setBackgroundAt (index, getBackground());
}
COM: <s> inserts panel into tabbed pane with name and tooltip at index </s>
|
funcom_train/14023724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Relation identity () {
Relation r = new HashRel();
int i=0;
for (Object[] o = toArray(); i<o.length; ++i) {
Maplet m = new Maplet(o[i], o[i]);
r.add(m);
}
return r;
}
COM: <s> constructs a relation mapping each value in this set onto itself </s>
|
funcom_train/43244975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSessionManager() {
System.out.println("getSessionManager");
SessionManager expResult = null;
SessionManager result = SessionManager.getSessionManager();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get session manager method of class org </s>
|
funcom_train/3392362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateClassFiles(RootDoc root, ClassTree classtree) {
generateClassFiles(classtree);
PackageDoc[] packages = root.specifiedPackages();
for (int i = 0; i < packages.length; i++) {
generateClassFiles(packages[i].allClasses(), classtree);
}
}
COM: <s> iterate through all classes and construct documentation for them </s>
|
funcom_train/18042419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() {
final String userLogout = this.connection.getUser();
try {
this.connection.disconnect();
JiahoLog.Info(JiahoConnection.class, userLogout +
" : " + JiahoGeneralProperties.InfoLogout);
} catch (Exception e) {
JiahoLog.Warn(JiahoConnection.class, userLogout +
" : " + JiahoGeneralProperties.WarnLogout, e);
}
}
COM: <s> disconnects from host server </s>
|
funcom_train/51060912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CacheablePinned new_CacheablePinned(CacheLine line) {
CacheablePinned handle = new
CacheablePinned(line, line.getHandle().getSize(), this);
if( DEBUG_PINS ) {
Carp.out( "DataCacheImpl: " + Thread.currentThread().getName() +
" pinning: " + line.getId() );
}
HandleTable.put(handle, line);
return handle;
}
COM: <s> pin the cache line place it into handle table </s>
|
funcom_train/8221771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPluginEnhancements(SwingPluginUI plugin) {
_summaryPanel.addUrlActions(plugin.getUrlActions());
_summaryPanel.addUrlColumns(plugin.getUrlColumns());
_summaryPanel.addConversationActions(plugin.getConversationActions());
_summaryPanel.addConversationColumns(plugin.getConversationColumns());
}
COM: <s> adds the plugin enhancements </s>
|
funcom_train/3814818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int toUnsignedShort(byte[] bytes, boolean bigEndian) {
if (bytes.length == 1) {
return 0xff & bytes[0];
} else if (bigEndian) {
return ((bytes[0] & 0xff) << 8) | (0xff & bytes[1]);
} else {
return ((bytes[1] & 0xff) << 8) | (0xff & bytes[0]);
}
}
COM: <s> converts a byte array into an unsigned short </s>
|
funcom_train/4521179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActividadElectoral update(ActividadElectoral entity) {
LogUtil.log("updating ActividadElectoral instance", Level.INFO, null);
try {
ActividadElectoral result = entityManager.merge(entity);
LogUtil.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
LogUtil.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved actividad electoral entity and return it or a </s>
|
funcom_train/48005671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String asString(){
// You can not just assign the dataBuffer,
// because the dataBuffer size is not
// really 'dataBufferSize'.
// get a temp
byte[] temp = new byte[ dataBufferSize ];
// write data
System.arraycopy( dataBuffer, 0, temp, 0, dataBufferSize );
// translate
String result = new String( temp );
return( result );
}
COM: <s> return as string </s>
|
funcom_train/7978697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void coalesceHostAuthorityStrings() {
if (this.cachedAuthorityMinusUserinfo != null
&& this.cachedHost != null
&& this.cachedHost.length() ==
this.cachedAuthorityMinusUserinfo.length()) {
// lengths can only be identical if contents
// are identical; use only one instance
this.cachedAuthorityMinusUserinfo = this.cachedHost;
}
}
COM: <s> the two string fields cached host and cached authority minus user info are </s>
|
funcom_train/31901183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerMap(Context c) {
MapUser mapUser = getMapUser(c);
if (mapUser != null) {
mapUser.setMapTag(this);
}
Iterator i = c.getMapUserList().iterator();
MapUser nextTag;
while (i.hasNext()) {
nextTag = (MapUser) i.next();
if (nextTag.getUseMap().equals("#" + this.getName())) {
nextTag.setMapTag(this);
}
}
}
COM: <s> if this map tag is inside a img input or object </s>
|
funcom_train/46457477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(Job job, Tool tool) {
if(tool==null) {
return;
}
Collection tools = (Collection) replies.get(job);
if(tools==null) {
tools = new HashSet();
replies.put(job, tools);
}
tools.add(tool);
}
COM: <s> logs a job and tool into the manager </s>
|
funcom_train/5395530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsDefault() {
System.out.println("isDefault");
DBPUnsignedByte instance = new DBPUnsignedByte();
boolean expResult = true;
boolean result = instance.isDefault();
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 is default method of class org </s>
|
funcom_train/2625030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int checkIndexOf(String str, int strStartIndex, String search) {
int endIndex = str.length() - search.length();
if (endIndex >= strStartIndex) {
for (int i = strStartIndex; i <= endIndex; i++) {
if (checkRegionMatches(str, i, search)) {
return i;
}
}
}
return -1;
}
COM: <s> checks if one string contains another starting at a specific index using the </s>
|
funcom_train/23011330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveDataStorageIndex(int index){
if(tempIndexA == null){
spatialIndex[index] = os.size();
if(osa!=null) attributeIndex[index] = osa.size();
}else{
tempIndexS.add(os.size());
tempIndexA.add(osa.size());
}
}
COM: <s> saves the current positions of streams in the index arrays </s>
|
funcom_train/45502339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteEvacuationPlan( EvacuationPlan val ) throws IllegalArgumentException {
if( !evacuationPlans.remove( val ) )
throw new IllegalArgumentException( ZLocalization.getSingleton().getString( "ds.PlanNotRegisteredException" ) );
val.delete();
if( val == currentEvacuationPlan )
currentEvacuationPlan = evacuationPlans.size() > 0 ? evacuationPlans.get( 0 ) : null;
}
COM: <s> deletes an evacuation plan from the project </s>
|
funcom_train/7674819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addStaticField(EncodedField field, Constant value) {
if (field == null) {
throw new NullPointerException("field == null");
}
if (staticValuesConstant != null) {
throw new UnsupportedOperationException(
"static fields already sorted");
}
staticFields.add(field);
staticValues.put(field, value);
}
COM: <s> adds a static field </s>
|
funcom_train/3409383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(boolean detailed) {
String out = toString();
if (detailed) {
out += "\n";
out += printKeys();
out += "\n" + printCertificates();
if (info != null) {
out += "\n\t" + info;
} else {
out += "\n\tno additional information available.";
}
}
return out;
}
COM: <s> returns a string representation of this identity with </s>
|
funcom_train/31486033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIssuerUserID(PGPPrincipal issueruserid) {
if (issueruserid == null) {
removePacket(PGPSignatureConstants.SSP_SIGNER_USERID);
} else {
PGPStringSP pkt = new PGPStringSP();
pkt.setValue(issueruserid.getName());
pkt.setPacketID(PGPSignatureConstants.SSP_SIGNER_USERID);
setPacket(pkt);
}
}
COM: <s> set or change the issuing user id </s>
|
funcom_train/9371708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt(String property, int def) {
Object value = super.get(property);
if (value == null) {
return def;
}
if (value instanceof Integer) {
return ((Integer)value).intValue();
}
throw new TypeException(property, value, "int");
}
COM: <s> returns the value of an integer property or the default if the property </s>
|
funcom_train/5379418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTreeExpanded(final TreeExpansionEvent event) {
Object[] listeners = treeListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final ITreeViewerListener l = (ITreeViewerListener) listeners[i];
SafeRunnable.run(new SafeRunnable() {
public void run() {
l.treeExpanded(event);
}
});
}
}
COM: <s> fires a tree expanded event </s>
|
funcom_train/42044858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThreadCount(int threads) {
if (threadsTF != null) {
String threadText = "";
if (threads > 0) {
threadText = ""+threads;
}
if (SwingUtilities.isEventDispatchThread()) {
threadsTF.setText(threadText);
} else {
final String finalThreadText = threadText;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
threadsTF.setText(finalThreadText);
}
});
}
}
}
COM: <s> set the number of threads currently running </s>
|
funcom_train/43905230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initHints(XMLHandlerHints hints) {
hints.put(XMLHandlerHints.STREAM_HINT, this);
hints.put(XMLHandlerHints.FLOW_HANDLER_HINT, new FCFlowHandler());
if (this.ft != null) {
hints.put("DEBUG_INFO_FEATURE_TYPE_NAME", ft.getTypeName());
}
}
COM: <s> called before parsing the feature collection </s>
|
funcom_train/28977482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startSubJob(Serializable object) throws Exception {
if (this.subJobQueue.contains(object)) {
throw new JobException("sorry a subjob with this property already exist!");
}
logger.info("create sub job");
this.storeObject(new SubJob(object));
Scheduler.schedule(object, getSubJobPriority());
this.subJobQueue.add(object);
this.getReport().report(object, Reports.SCHEDULE, Reports.SUB_JOB);
}
COM: <s> starts a related subjob </s>
|
funcom_train/47509550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(DocumentoSituacao entity) {
EntityManagerHelper.log("saving DocumentoSituacao instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved documento situacao entity </s>
|
funcom_train/32116859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isMethodOverridden(ExecutableElement method) {
// TODO check the exact meaning of this method and its usage
for (Entry<ExecutableElement, TypeElement> parsedMethod : scannedMethodList) {
if (elementUtils().overrides(parsedMethod.getKey(), method, parsedMethod.getValue())) {
return true;
}
}
return false;
}
COM: <s> checks whether a method is overridden by an already scanned one </s>
|
funcom_train/22542413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeNodeID() {
KUID newID = KUID.createRandomID();
if (LOG.isInfoEnabled()) {
LOG.info("Changing local Node ID from " + getLocalNodeID() + " to " + newID);
}
setLocalNodeID(newID);
purgeDatabase(true);
}
COM: <s> generates a new random node id for the local node </s>
|
funcom_train/14406797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateValues(DataContainer dataContainer) throws WbemsmtException {
if (!validators.containsKey(dataContainer))
{
installValidators(dataContainer);
}
MessageList result = new MessageList();
List<Validator> validatorList = (List<Validator>) validators.get(dataContainer);
for (int i = 0; validatorList != null && i < validatorList.size(); i++) {
Validator validator = (Validator) validatorList.get(i);
result.addAll(validator.validate());
}
dataContainer.setMessagesList(result);
}
COM: <s> validates the data container </s>
|
funcom_train/42710560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonDeletePosition() {
if (jButtonDeletePosition == null) {
jButtonDeletePosition = new JButton();
jButtonDeletePosition.setText("Delete");
jButtonDeletePosition.setBounds(new Rectangle(10, 210, 121, 21));
jButtonDeletePosition.setActionCommand("DeletePosition");
}
return jButtonDeletePosition;
}
COM: <s> this method initializes j button delete position </s>
|
funcom_train/19073544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finalize() throws Throwable {
super.finalize();
LayerName = null;
bias = null;
monitor = null;
if(inputPatternListeners != null) {
inputPatternListeners.clear();
inputPatternListeners = null;
}
if(outputPatternListeners != null) {
outputPatternListeners.clear();
outputPatternListeners = null;
}
}
COM: <s> method to help remove disused references quickly </s>
|
funcom_train/33426541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cacheImage(Image image) {
ListEntry entry = (ListEntry) historyList.get(historyIndex);
// Save the current image in case we should show it again.
if (entry.cachedImage == null) {
// That is, if it is not already saved.
entry.cachedImage = new SoftReference(image);
}
} // cacheImage
COM: <s> save the image in the history cache </s>
|
funcom_train/23068161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(FilterConfig arg0) throws ServletException {
if (log.isDebugEnabled()) log.debug("Initializing OslerResourceFilter...");
if (servletContext == null) {
log.error("servletContext cannot be null - failing.");
throw new ServletException("servletContext cannot be null");
}
if (uriMarker == null) {
log.error("uriMarker cannot be null - failing.");
throw new ServletException("uriMarker cannot be null");
}
}
COM: <s> called when the application is initialized </s>
|
funcom_train/43245394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTmpAddrFromDate() {
System.out.println("setTmpAddrFromDate");
Calendar tmpAddrFromDate = null;
PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object();
instance.setTmpAddrFromDate(tmpAddrFromDate);
// 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 tmp addr from date method of class org </s>
|
funcom_train/43280068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ModelPart clone(final ModelPart part, final IModelInputOutput io) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
io.saveModel(part, bos);
} catch (Exception e) {
}
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
try {
return io.loadModel(bis, part.get_ModelPartClass());
} catch (Exception e) {
}
System.err.println("COULD NOT CLONE");
return null;
}
COM: <s> clone the model part </s>
|
funcom_train/50154836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initProperties() {
props = new ObservableProperties();
InputStream is = null;
try {
is = new FileInputStream(getPropertiesFile());
props.load(is);
}
catch (IOException ioe) {
log(ioe.getMessage());
}
finally {
if (is != null) {
try {
is.close();
}
catch (Exception e) {}
}
}
}
COM: <s> method init properties </s>
|
funcom_train/37089130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInternalDbEdgeDatasetId() {
// just getting on dataload - more efficient, not retrieve separately
// presumptious?
// if (internalDbEdgeId == -1 && haveEdgeInfoRetriever())
// internalDbEdgeId = infoRetriever().retrieveInternalDbEdgeDatasetId(this);
return internalDbEdgeId;
}
COM: <s> optional internal db id convenience for caching for further retrievals ideally </s>
|
funcom_train/51098391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JRootPane findRootPaneFor(View view) {
JRootPane pane = super.findRootPaneFor(view);
if (pane != null) {
return pane;
}
if (((SwingView) view).getDisplayMode() != SwingView.PRIMARY_WINDOW) {
return pane;
}
return frame.getRootPane();
}
COM: <s> overrides super implementation to allow using scope together with normal swing </s>
|
funcom_train/12812203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(String text) throws ParseException {
Parsing t = new Parsing(text);
if (parsing(t)) // Verify text completely interpretated
t.gobbleSpaces();
if (t.pos != t.length) throw new ParseException
("****Astrotime: argument '" + text + "'", t.pos);
}
COM: <s> set the time from a string </s>
|
funcom_train/2881310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException, RemoteException {
if (!isActive) {
throw new RemoteException("RmiConnectorServer is not active");
}
return rmiConnectorServer.getMBeanServer().isInstanceOf(name, className);
}
COM: <s> gets the instance of attribute of the rmi connector proxy object </s>
|
funcom_train/8196976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExplodePercent(Comparable key, double percent) {
if (key == null) {
throw new IllegalArgumentException("Null 'key' argument.");
}
if (this.explodePercentages == null) {
this.explodePercentages = new TreeMap();
}
this.explodePercentages.put(key, new Double(percent));
notifyListeners(new PlotChangeEvent(this));
}
COM: <s> sets the amount that a pie section should be exploded and sends a </s>
|
funcom_train/1864860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillArea(Point point1, Point point2, boolean isBlack) {
synchronized (image) {
graphicsArea.setColor(convertBoolean(isBlack));
final int x = (point2.x-point1.x > 0) ? point1.x : point2.x;
final int y = (point2.y-point1.y > 0) ? point1.y : point2.y;
graphicsArea.fillRect(x, y, Math.abs(point2.x-point1.x), Math.abs(point2.y-point1.y+1));
}
}
COM: <s> fill a specified area in either white or black </s>
|
funcom_train/41379883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IToken doEvaluate(ICharacterScanner scanner, boolean resume) {
if (resume) {
if (endSequenceDetected(scanner)){
scanner.unread();
scanner.unread();
return fToken;}
} else {
int c= scanner.read();
if (c == fStartSequence[0]) {
if (sequenceDetected(scanner, fStartSequence, false)) {
if (endSequenceDetected(scanner)){
scanner.unread();
scanner.unread();
return fToken;}
}
}
}
scanner.unread();
return Token.UNDEFINED;
}
COM: <s> evaluates this rules without considering any column constraints </s>
|
funcom_train/43664011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBPackagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BService_bPackage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BService_bPackage_feature", "_UI_BService_type"),
XmdlboPackage.Literals.BSERVICE__BPACKAGE,
true,
false,
false,
null,
getString("_UI_BusinessModelPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the bpackage feature </s>
|
funcom_train/5264910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void invChanged() {
try {
AdvProperties p = new AdvProperties(txtInvitation.getText());
AdvProperties net = p.filter("network", false);
PublicKey netKey = CryptoUtils.decodeRSAPublicKey(p.getPropertyBytes("network.publicKey", null));
btnOK.setEnabled(net.verify("network.signature", netKey));
} catch (NullPointerException e) {
btnOK.setEnabled(false);
}
}
COM: <s> inv changed is called when the invitation text changed </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.