__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/28981438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InstructionHandle lookUpSuperConstructorCall() {
// construct a finder
InstructionFinder finder =
new InstructionFinder( iList );
// do the search
Iterator iter
= finder.search(
Constants.OPCODE_NAMES[Constants.INVOKESPECIAL] );
if( iter.hasNext() ) {
InstructionHandle[] ih
= (InstructionHandle[])iter.next();
return ih[0];
}
throw new AspectException(
"unexpected situation: " +
"expected super() or this(...) statement but found none!" );
}
COM: <s> returns a handle to the super this </s>
|
funcom_train/19825226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private long getBundleID(String[] base, String idLocation) {
try {
return Long.parseLong(idLocation);
} catch (NumberFormatException nfe) {
long id = framework.getBundleId(completeLocation(base, idLocation));
if (id != -1) {
return id;
}
throw new IllegalArgumentException("Invalid bundle id/location: "
+ idLocation);
}
}
COM: <s> returns a bundle id from a string </s>
|
funcom_train/16792089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLocalisedString(ResourceBundle resources, PVRState state) {
StringBuilder builder = new StringBuilder(32);
builder.append(this.getType().getLocalisedName());
builder.append(" ");
if (this.number >= 0)
builder.append(state.getStations(this.type).getStation(this.number).getName());
return builder.toString();
}
COM: <s> get a localised description of the current channel </s>
|
funcom_train/25188690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetDisallow_JSONValueType() throws Exception {
System.out.println("setDisallow");
JSchema instance = new JSchema();
instance.setDisallow(JSONValueType.ARRAY);
List expResult = Collections.singletonList(JSONValueType.ARRAY);
assertEquals(expResult, instance.getDisallow());
}
COM: <s> test of set disallow method of class jschema </s>
|
funcom_train/35669832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLinguisticValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LNodeValue_linguisticValue_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LNodeValue_linguisticValue_feature", "_UI_LNodeValue_type"),
LCPnetPackage.Literals.LNODE_VALUE__LINGUISTIC_VALUE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the linguistic value feature </s>
|
funcom_train/29647868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRotShearScale() throws Exception {
// Rotation and shear
MagickImage rotated = image.rotateImage(45.0);
MagickTesttools.writeAndCompare(rotated, info, "rotated.jpg");
MagickImage sheared = image.shearImage(50.0, 10.0);
MagickTesttools.writeAndCompare(sheared, info, "sheared.jpg");
MagickImage scaled = image.scaleImage(100, 80);
MagickTesttools.writeAndCompare(scaled, info, "scaled.jpg");
}
COM: <s> test of diverse operations on a small is processed correctly </s>
|
funcom_train/3740136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean belongsToGroup(User user, Group group) throws HibernateException {
Session sess = HibernateUtil.currentSession();
Criteria crit = sess.createCriteria(UsersInGroup.class);
crit.add(Expression.eq("group", group));
crit.add(Expression.eq("allUser", user.getAllUser()));
List match = crit.list();
return !(match.isEmpty());
}
COM: <s> check whether given user is member of the given group </s>
|
funcom_train/1241504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HashMap createApplicationProperties(MessageContext context) {
HashMap props = null;
if (context.containsProperty(
JMSConstants.JMS_APPLICATION_MSG_PROPS)) {
props = new HashMap();
props.putAll((Map)context.getProperty(
JMSConstants.JMS_APPLICATION_MSG_PROPS));
}
return props;
}
COM: <s> return a map of properties that makeup the application specific </s>
|
funcom_train/43358034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ScopeBlock findScopeBlock(ScopeBlock sb, int pc) {
if ((pc > sb.getStart()) && (pc < sb.getFinish())) {
if (sb.children != null) {
for (ScopeBlock child : sb.children) {
ScopeBlock foundSb = findScopeBlock(child, pc);
if (foundSb != null) {
return foundSb;
}
}
}
return sb;
}
return null;
}
COM: <s> returns the scope block in which this register was assigned by </s>
|
funcom_train/491222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String next(int n) throws JSONException {
int i = this.myIndex;
int j = i + n;
if (j >= this.mySource.length()) {
throw syntaxError("Substring bounds error");
}
this.myIndex += n;
return this.mySource.substring(i, j);
}
COM: <s> get the next n characters </s>
|
funcom_train/11702632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processCas(CAS aCAS) throws ResourceProcessException {
try {
// delegate analysis of the CAS to remote object
transport.process(socket, aCAS);
} catch (SocketException e) {
throw new ResourceProcessException(new ServiceConnectionException(e));
} catch (Exception e) {
throw new ResourceProcessException(e);
}
}
COM: <s> uses configured transport to delegate given cas to the remote service </s>
|
funcom_train/7623801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long replace(String table, String nullColumnHack, ContentValues initialValues) {
try {
return insertWithOnConflict(table, nullColumnHack, initialValues,
ConflictAlgorithm.REPLACE);
} catch (SQLException e) {
Log.e(TAG, "Error inserting " + initialValues, e);
return -1;
}
}
COM: <s> convenience method for replacing a row in the database </s>
|
funcom_train/26391633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getOrder(engine z) {
for (Enumeration e = my_vector.elements(); e.hasMoreElements();) {
z.push(e.nextElement());
} /* End for*/
z.push(new Long(my_vector.size()));
} /* public void getOrder(engine z)*/
COM: <s> push the search order topped by number of wordlists in search order </s>
|
funcom_train/44556759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumParams() {
switch (fit) {
case STRAIGHT_LINE: return 2;
case POLY2: return 3;
case POLY3: return 4;
case POLY4: return 5;
case EXPONENTIAL: return 2;
case POWER: return 2;
case LOG: return 2;
case RODBARD: case RODBARD2: return 4;
case GAMMA_VARIATE: return 4;
case LOG2: return 3;
case EXP_WITH_OFFSET: return 3;
}
return 0;
}
COM: <s> get number of parameters for current fit function </s>
|
funcom_train/43288737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void print(final LogEntry entry) {
StringBuffer text = new StringBuffer();
ModelPart source = entry.getSource();
if (source != null) {
text.append(source.getClass() + "(" + source + "):");
} else {
text.append("null: ");
}
text.append(entry.getAttributeName());
text.append(": ");
text.append(entry.getMessage());
log.debug(text);
}
COM: <s> print the log entry </s>
|
funcom_train/17769118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTheAsteroids(Asteroid[] asteroids) {
for (int k = 0; k < numberOfAsteroids; k++) {
int direction = (int) (Math.random() * 360);
double minimumvelocity = Math.random() * 3;
asteroids[k] = randomAsteroidGenerator(minimumvelocity,
minimumNumberOfVertex,
mediumRadius);
}
}
COM: <s> generates all the asteroids we need </s>
|
funcom_train/11728800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compareValues(String n, String p, Value[] a, Value[] b) {
assertEquals("Multi-value property '" + p + "' of node '" + n + "' has changed length: ", a.length, b.length);
for (int t = 0; t < a.length; t++) {
compareValue(n, p, a[t], b[t]);
}
}
COM: <s> compares a set of multi value properties </s>
|
funcom_train/22285582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
if ((comp != null) && !getPlayerPanel().editing()) {
//validate();
comp.setBackground(background);
comp.setForeground(foreground);
comp.setFont(font);
//comp.show();
started = true;
player = getPlayerPanel();
comp.setVisible(true); // Added, but what about show()?
// That was removed for some reason, I suppose.
}
}
COM: <s> start the widget and show the awt component </s>
|
funcom_train/27778883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCountMap() {
System.out.println("testGetCountMap");
Map<String,Integer> map = set.getCountMap();
for(String s : map.keySet()){
System.out.println(s+" recieved "+map.get(s)+" counts");
}
}
COM: <s> test of get count map method of class jxl </s>
|
funcom_train/32057021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetToolComponent() {
System.out.println("testGetToolComponent");
GPGraphpad gp = new GPGraphpad();
ToolBoxRectangle t = new ToolBoxRectangle(gp);
Component c = t.getToolComponent(new String("TEST"));
assertTrue( c == t.getToolComponent( new String("TEST") ) );
//gp.getFrame().dispose();
}
COM: <s> test of get tool component method of class tool box rectangle </s>
|
funcom_train/32137800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent event) {
String property = event.getProperty();
if(property.equals(PreferenceConstants.P_LOG_ENABLED) || property.equals(PreferenceConstants.P_LOG_FILE)
|| property.equals(PreferenceConstants.P_LOG_LEVEL) || property.equals(PreferenceConstants.P_LOG_TYPE)) {
logInfo("LogManager reinitialization in progress", this);
init();
}
}
COM: <s> property change event handler notifies the logging system when the user has changed </s>
|
funcom_train/1959793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
int a0 = (address[0] + 256) % 256;
int a1 = (address[1] + 256) % 256;
int a2 = (address[2] + 256) % 256;
int a3 = (address[3] + 256) % 256;
return a0 + "." + a1 + "." + a2 + "." + a3;
}
COM: <s> get the ipaddress in the dotted string representation </s>
|
funcom_train/16849999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonOK() {
if (jButtonOK == null) {
jButtonOK = new JButton();
jButtonOK.setBounds(new Rectangle(444, 355, 66, 24));
jButtonOK.setText("Ok");
jButtonOK.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
dispose();
}
});
}
return jButtonOK;
}
COM: <s> this method initializes j button ok </s>
|
funcom_train/34132641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getLineWidth(Element line) {
int p0 = line.getStartOffset();
int p1 = line.getEndOffset();
int w;
Segment s = SegmentCache.getSharedSegment();
try {
line.getDocument().getText(p0, p1 - p0, s);
w = Utilities.getTabbedTextWidth(s, metrics, tabBase, this, p0);
} catch (BadLocationException ble) {
w = 0;
}
SegmentCache.releaseSharedSegment(s);
return w;
}
COM: <s> calculate the width of the line represented by </s>
|
funcom_train/8073875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double norm (double x, int i) {
if (Double.isNaN(m_minArray[i]) ||
Utils.eq(m_maxArray[i], m_minArray[i])) {
return 0;
}
else {
return (x - m_minArray[i])/(m_maxArray[i] - m_minArray[i]);
}
}
COM: <s> normalizes a given value of a numeric attribute </s>
|
funcom_train/51153465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteSelectedPojo()
{
// removes the POJO being stored in the element of the
// underlying list holder object.
XPersistentPojoModel pm = getListSelectedModel();
if ( pm != null )
pm.delete();
// remove the reference to the POJO from the selection model
if ( selectionModel != null )
selectionModel.set( null );
}
COM: <s> removes the pojo being stored in the selection model from </s>
|
funcom_train/45317300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAgent(Agent agent) {
try {
// Add the agent to the campaign
// The asterisk object takes care of adding the agent into the queue
agents.put(agent.getAgentID(), agent);
} catch (Exception ex) {
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.SEVERE, null, ex);
}
}
COM: <s> adds an agent to this campaign </s>
|
funcom_train/3924373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean getNext() {
boolean ret = false;
synchronized( lock ) {
while ( (ret = iterator.hasNext()) ) {
next = iterator.next();
if ( next instanceof DBRef ) {
next = ((DBRef)next).get();
}
//Logger.logDebug( "Examining "+next );
if ( filter.validate( next )) {
break;
}
}
}
return ret;
}
COM: <s> this implements filtering </s>
|
funcom_train/47814326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadUserNames() {
lbUserName.clear();
userhandling.getUserList(new OrderBy("inventory_user.name", SortOrder.ASC),
new OkCallback<List<User>>() {
public void onSuccess(final List<User> users) {
lbUserName.addItem("");
for (int i = 0; i < users.size(); i++) {
lbUserName.addItem(users.get(i).getName());
}
};
});
}
COM: <s> this method loads the names from the user </s>
|
funcom_train/25315703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addGears(){
for(int i = 0; i < this.amountOfGears; i++){
gears.add( new Gear(this.x + (int)(this.width / 1.2) * i + (int)(this.width / 20),
this.y + (int)(this.width / 3),
(int)(this.width / 1.6)));
}
}
COM: <s> create gear objects for this </s>
|
funcom_train/39388503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupActuators() {
Hexapod h = getHexapod();
StepActuatorGroup sag = h.getActuatorGroup();
for(int i =0;i<StepActuatorGroup.NUM_ACTUATORS;i++) {
sag.getActuator(i).setStepDegrees(degreesPerStep);
sag.getActuator(i).setThreadsPerInch(threadsPerInch);
}
}
COM: <s> puts the values from this objects degrees per step and threads per inch </s>
|
funcom_train/26490226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertNewData() {
DBConnection con = null;
try {
con = DBServiceManager.allocateConnection();
con.executeUpdate("INSERT INTO mylnk_Settings VALUES ("+ownerid+", 1, 6)");
} catch (SQLException e) {
System.err.println("SQLException: "+e);
} finally {
if (con != null) con.release();
}
}
COM: <s> insert a set of default settings for </s>
|
funcom_train/167209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws FileNotFoundException {
jsProtocolParserProtocol = new JSProtocolParser(new FileInputStream("src/test/resources/org/simBio/sim/js/3A_NCXvsCaLStub.xml"));
jsProtocolParserModel = new JSProtocolParser(new FileInputStream("../simBio/src/xml/matsuoka_et_al_2003/model.xml"));
}
COM: <s> setup for testcases </s>
|
funcom_train/1541969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int writeBytes(byte[] data, int offset) {
maxPos = Math.max(maxPos, offset + data.length);
if (data.length + offset > pngBytes.length) {
pngBytes = resizeByteArray(pngBytes, pngBytes.length
+ Math.max(1000, data.length));
}
System.arraycopy(data, 0, pngBytes, offset, data.length);
return offset + data.length;
}
COM: <s> write an array of bytes into the png bytes array </s>
|
funcom_train/42037880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean executeDocument (Project project) throws IOException {
String code = project.getDocument();
if (code == null || code.trim().isEmpty()) return false;
HashMap<String, Object> parameters = new HashMap();
parameters.put("project", project);
executeCode(project, code, parameters);
return true;
}
COM: <s> executes java code in the specified projects document if any </s>
|
funcom_train/9765461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float distanceToLine(vPoint3f p1, vPoint3f p2) {
vPoint3f p21 = new vPoint3f(p1, p2);
float d = p21.vectorNorm();
if (d < 0.00001f) {
return 0; // Line is not determined
}
vPoint3f p10 = new vPoint3f(this, p1);
vPoint3f cross = p21.crossProduct(p10);
return cross.vectorNorm() / d;
}
COM: <s> check out that it works properly </s>
|
funcom_train/46015235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getWishItemsText() {
Iterator it = serverWishItems.iterator();
StringBuffer strb = new StringBuffer();
while (it.hasNext()) {
strb.append(it.next());
if (it.hasNext()) {
strb.append("\n");
}
}
return strb.toString();
}
COM: <s> get all wish items in text format for printing in gui </s>
|
funcom_train/20797853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean deleteConfirmed(int tagCnt){
if(tagCnt == 0){return(false);}
final IPreferenceStore store = TaggerActivator.getDefault().getPreferenceStore();
if(store.getBoolean(PreferenceConstants.CONFIRM_DELETE_TAG.getKey())){
return(MessageDialog.openConfirm(view.getSite().getShell(),TaggerMessages.DeleteTagAction_Confirm_Title,TaggerMessages.DeleteTagAction_Confirm_Text));
} else {
return(true);
}
}
COM: <s> used to determine based on preferences if the delete should be confirmed </s>
|
funcom_train/8777155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void simpleInitGame() {
display.setTitle("Cylinder Test");
myalien = new DynamicExemplar("onealien");
myalien.setUpExemplar();
lightState.setTwoSidedLighting(false);
rootNode.attachChild(myalien);
CullState cs = display.getRenderer().createCullState();
cs.setCullFace(CullState.Face.Back);
rootNode.setRenderState(cs);
input = new FirstPersonHandler(cam, 10f, 1f);
}
COM: <s> builds the trimesh </s>
|
funcom_train/17947314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshVisuals(boolean animate){
refreshTitle();
if(collapseToggle.isSelected()){
scrollpane.setVisible(true);
arrow.setDirection(Orientable.SOUTH);
scrollpane.setVerticalScrollBarVisibility(ScrollPane.NEVER);
if (animate)
((AnimatableFigure)getFigure()).expand();
else
((AnimatableFigure)getFigure()).setExpanded(true);
scrollpane.setVerticalScrollBarVisibility(ScrollPane.AUTOMATIC);
}else{
arrow.setDirection(Orientable.EAST);
scrollpane.setVerticalScrollBarVisibility(ScrollPane.NEVER);
if (animate)
((AnimatableFigure)getFigure()).collapse();
else
((AnimatableFigure)getFigure()).setExpanded(false);
scrollpane.setVisible(false);
}
}
COM: <s> refreshes the figure for this part </s>
|
funcom_train/7634931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeProximityAlert(PendingIntent intent) {
if (Config.LOGD) {
Log.d(TAG, "removeProximityAlert: intent = " + intent);
}
try {
mService.removeProximityAlert(intent);
} catch (RemoteException ex) {
Log.e(TAG, "removeProximityAlert: RemoteException", ex);
}
}
COM: <s> removes the proximity alert with the given pending intent </s>
|
funcom_train/8629574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkOwnsNoSchemas() throws SQLException {
for (Schema s : database.getAllSchemas()) {
if (this == s.getOwner()) {
throw Message.getSQLException(ErrorCode.CANNOT_DROP_2, getName(), s.getName());
}
}
}
COM: <s> check that this user does not own any schema </s>
|
funcom_train/37083704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DeleteTransaction purgeAnnot (AnnotatedFeatureI delete_annot) {
/* Genes are no longer automatically deleted inside of deleteFeature
if the number of transcripts goes to zero, so this needs to
happen here now */
FeatureSetI annotParent = delete_annot.getParent();
if (annotParent != null)
annotParent.deleteFeature(delete_annot);
DeleteTransaction dt = new DeleteTransaction(delete_annot,annotParent);
return dt;
}
COM: <s> deletes gene from model returns delete transaction </s>
|
funcom_train/13314844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(Summarize n, A argu) {
n.nodeToken.accept(this, argu);
n.relationExp.accept(this, argu);
n.nodeOptional.accept(this, argu);
n.nodeToken1.accept(this, argu);
n.nodeToken2.accept(this, argu);
n.summarizeAddCommalist.accept(this, argu);
n.nodeToken3.accept(this, argu);
}
COM: <s> node token summarize </s>
|
funcom_train/3086491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadStyleSheet(String styleSheetFileName) throws StyleSheetParseException {
try {
loadStyleSheet(new java.io.BufferedReader(new java.io.FileReader(new File(styleSheetFileName))));
} catch (java.io.FileNotFoundException fne) {
throw new StyleSheetParseException(-1, fne, null);
}
}
COM: <s> loads the css style sheet data contained in the file named file name </s>
|
funcom_train/8806245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean overlapsWith(int rangeOffset, int rangeLength) {
if (isDeleted)
return false;
int end= rangeOffset + rangeLength;
int thisEnd= this.offset + this.length;
if (rangeLength > 0) {
if (this.length > 0)
return this.offset < end && rangeOffset < thisEnd;
return rangeOffset <= this.offset && this.offset < end;
}
if (this.length > 0)
return this.offset <= rangeOffset && rangeOffset < thisEnd;
return this.offset == rangeOffset;
}
COM: <s> checks whether the intersection of the given text range </s>
|
funcom_train/46336412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCheckElementTypes() {
System.out.println("checkElementTypes");
_oc.checkElementTypes("param", "clear_cached", "invalidate_cached");
_ocp.checkElementTypes("field");
_oc.checkElementTypes("x");
}
COM: <s> test of check element types method of class opb comment </s>
|
funcom_train/3751897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void expandTemplate(StringFinder context, Object tpl, StringCollector collector) {
if (tpl instanceof Tract) {
expandTract(context, (Tract) tpl, collector);
} else if (tpl != null) {
expandString(context, StringUtils.stringValue(tpl), collector);
}
}
COM: <s> expand a directly supplied template which may be a string or a tract </s>
|
funcom_train/1883979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel7() {
if (this.jPanel7 == null) {
this.jPanel7 = new JPanel();
this.jPanel7.setLayout(new BorderLayout());
this.jPanel7.add(this.getJPanel(), BorderLayout.NORTH);
this.jPanel7.add(this.getJPanel8(), BorderLayout.SOUTH);
}
return this.jPanel7;
}
COM: <s> this method initializes j panel7 </s>
|
funcom_train/36247760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createAmiSection(Composite composite) {
Label amiLabel = new Label(composite, SWT.WRAP);
amiLabel.setText("Server AMI:");
GridData gridData = new GridData();
gridData.verticalAlignment = SWT.TOP;
gridData.verticalIndent = 2;
amiLabel.setLayoutData(gridData);
String currentRegion = Ec2Plugin.getDefault().getPreferenceStore().getString(PreferenceConstants.P_EC2_REGION_NAME);
String defaultAmi = getAmiForCluster(currentRegion);
amiOverrideComposite = new AmiOverrideComposite(composite, defaultAmi);
}
COM: <s> creates the ami selection ui controls in the given composite </s>
|
funcom_train/1629380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransactionIsolationLevel getTransactionIsolationLevel() {
try {
synchronized (_kbLock) {
if (transactionMonitor == null) {
return TransactionIsolationLevel.NONE;
}
return transactionMonitor.getTransationIsolationLevel();
}
} catch (TransactionException te) {
Log.getLogger().log(Level.WARNING, "Exception caught finding transaction isolation level", te);
return null;
}
}
COM: <s> calculates the transaction isolation level </s>
|
funcom_train/42857122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean active(Set<String> activeProps) {
for (int i = 0; i < this._propList.size(); i++) {
if ((this._values.charAt(i) == '1')
&& (!activeProps.contains(this._propList.get(i)))) {
++_timeSpentOff;
return false;
}
}
_timeSpentOff = 0;
return true;
}
COM: <s> returns true if this node is activated by </s>
|
funcom_train/12561864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int unPad(byte[] outBuff, int size) throws BadPaddingException {
int padValue = outBuff[size - 1] & 0xff;
if (padValue < 1 || padValue > blockSize) {
throw new BadPaddingException();
}
for (int i = 0; i < padValue; i++) {
if (outBuff[--size] != padValue)
throw new BadPaddingException();
}
return padValue;
}
COM: <s> removes padding bytes that were added to the input </s>
|
funcom_train/14626530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() throws Exception{
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.setSize(new Dimension(371, 268));
jContentPane.add(get_cancelButton(), null);
jContentPane.add(get_okButton(), null);
jContentPane.add(get_addressPanel(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/212602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageRef(BufferedImage imageRef, Window window){
this.imageRef = imageRef;
this.repaint();
Dimension imageDimension = new Dimension(imageRef.getWidth(), imageRef.getHeight());
this.setPreferredSize(imageDimension);
scrollPane.revalidate();
}
COM: <s> set the image reference and repaint this component </s>
|
funcom_train/44162607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendToAll(Element element, Connection exceptConnection) {
for (Connection c : new ArrayList<Connection>(connections.values())) {
if (c == exceptConnection) continue;
try {
c.sendAndWait(element);
} catch (IOException e) {
logger.log(Level.WARNING, "Unable to send to: " + c, e);
}
}
}
COM: <s> sends a network message to all connections with an optional exception </s>
|
funcom_train/15626536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNode(@NotNull final DefaultMutableTreeNode treeNode) {
if (treeNode != root) {
final String directory = getDirectory(treeNode);
treeModel.removeNodeFromParent(treeNode);
deletedNodes.addFirst(new DeletedNode(directory, treeNode));
while (deletedNodes.size() > 10) {
deletedNodes.removeLast();
}
save();
}
}
COM: <s> removes a node from the tree </s>
|
funcom_train/50513248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BFSystemOwner grabSystem(double x, double y) {
Collection<BFSystemOwner> systems = DBWrapper.getAllSystemOwner();
for (BFSystemOwner system : systems) {
if (isSystemGrabbed(system.getSystem(), x, y)) {
return system;
} /* if */
} /* for */
return null;
} // grabSystem
COM: <s> returns the first system that would be grabbed by a click </s>
|
funcom_train/25664710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enemy(final int colour1, final int colour2) {
if (this.alliances == null) {
return;
}
final Set<Integer> c1Allies = this.alliances.get(colour1);
if (c1Allies != null) {
c1Allies.remove(colour2);
if (c1Allies.isEmpty()) {
this.alliances.remove(colour1);
}
}
final Set<Integer> c2Allies = this.alliances.get(colour2);
if (c2Allies != null) {
c2Allies.remove(colour1);
if (c2Allies.isEmpty()) {
this.alliances.remove(colour2);
}
}
if (this.alliances.isEmpty()) {
this.alliances = null;
}
}
COM: <s> restores two armies as enemies again </s>
|
funcom_train/13273511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Composite setTransparency(Graphics2D g2D, float alpha) {
Composite oldComposite = g2D.getComposite();
if (oldComposite instanceof AlphaComposite) {
g2D.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
((AlphaComposite)oldComposite).getAlpha() * alpha));
} else {
g2D.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha));
}
return oldComposite;
}
COM: <s> sets the transparency composite to the given percentage and returns the old composite </s>
|
funcom_train/47289285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void computeCurvColors(){
needCurvFeatureSize();
float cscale = parent.sq(8.0f * curvFeatureSize);
int nv = vertices.size();
curvColors= new PVector[nv];
for (int i = 0; i < nv; i++) {
float H = 0.5f * (curv1[i] + curv2[i]);
float K = curv1[i] * curv2[i];
float h = 4.0f / 3.0f * Math.abs((float)Math.atan2(H*H-K,H*H*sgn(H)));
float s = parent.TWO_PI * (float)Math.atan((2.0f*H*H-K)*cscale);
curvColors[i] = hsv(h,s,1.0f);
}
}
COM: <s> color the mesh by curvatures </s>
|
funcom_train/16547934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(ExtensionMapping view) {
if (resource != null) {
int resCmp = resource.compareTo(view.resource);
int extComp = (extension == null ? extComp = -1
: extension.compareTo(view.extension));
return (resCmp != 0 ? resCmp : extComp);
} else {
return -1;
}
}
COM: <s> natural sort order is resource then extension </s>
|
funcom_train/12181472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void supportGlobalActions() {
new ViewerGlobalActionManager(globalActions, getTreeViewer(),
getSite().getActionBars());
// Add a selection listener to the viewer for action bar update.
getTreeViewer().
addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
getSite().getActionBars().updateActionBars();
}
});
}
COM: <s> support global actions within this page </s>
|
funcom_train/12164519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmpty() throws ConfigurationException {
CacheValue value = new CacheValue();
// mandatory
value.name = "";
value.maxEntries = "1"; // 0 is invalid.
// default
value.strategy = "least-recently-used";
value.maxAge = "unlimited";
doTest(value);
}
COM: <s> test with an empty value object </s>
|
funcom_train/32979221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getPluginHashState(String pluginName, String varName, byte defValue)
{ /* getPluginState */
Object obj= getPluginHashState(pluginName, varName);
if(obj==null || !(obj instanceof Byte))
return(defValue);
byte value= ((Byte)obj).byteValue();
return(value);
} /* getPluginHashState */
COM: <s> get plugin hash state get byte state value from maeplugin hash state storage </s>
|
funcom_train/3833385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Graphics2D setColor(Graphics2D g2, Color color, double opacity) {
Debug.debugMethodBegin();
if (opacity < 0.999) {
final int alpha = (int)Math.round(opacity * 255);
final int red = color.getRed();
final int green = color.getGreen();
final int blue = color.getBlue();
color = new Color(red, green, blue, alpha);
}
g2.setColor(color);
Debug.debugMethodEnd();
return g2;
}
COM: <s> sets the color including an opacity </s>
|
funcom_train/8804646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int decipher ( byte[] ciphertext, int offset, int len, byte[] output, int outofs){
if ( null == this.d || null == this.n)
throw new java.lang.IllegalArgumentException("Private key is not available.");
else
return this.decipher( n, d, ciphertext, offset, len, output, outofs);
}
COM: <s> cipher interface to decrypt the ciphertext block using the </s>
|
funcom_train/37610742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _removeAllAuxiliary() {
assert EventQueue.isDispatchThread();
Runnable1<OpenDefinitionsDocument> op = new Runnable1<OpenDefinitionsDocument>() {
public void run(OpenDefinitionsDocument d) { _model.removeAuxiliaryFile(d); }
};
_processDocs(_model.getDocumentNavigator().getDocumentsInBin(_model.getAuxiliaryBinTitle()), op);
}
COM: <s> converts all auxiliary files to external files </s>
|
funcom_train/49206754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(ExecutionEvent event) throws ExecutionException {
log.debug("execute");
final String outputDir = LopbPreferenceChangeManager.getInstance().getCsvOutputBaseDir();
ExportManager.getInstance().export(outputDir);
final Shell parentShell = HandlerUtil.getActiveShell(event);
final Dialog dialog = new MessageDialog(parentShell, "Success", null, "CSV files written to " + outputDir,
MessageDialog.INFORMATION, new String[] { "Ok" }, 0);
dialog.open();
return null;
}
COM: <s> the command has been executed so extract extract the needed information </s>
|
funcom_train/48055100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setApplicationName(String name) {
applicationName = name;
String title;
if (applicationName != null) {
title = MessageFormat.format(bundle.getString("{0}_logs"), name);
} else {
title = bundle.getString("Logs");
}
header.setTitle(title);
setTitle(title);
}
COM: <s> sets the application name </s>
|
funcom_train/12163102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureMinimalLabel(boolean inMenuItem) throws Exception {
// The currently open menu label must have a configured text
builder.startText();
configureMinimalText();
builder.endText();
if (inMenuItem) {
// It should only have an icon in a menu item
builder.startIcon();
configureMinimalIcon();
builder.endIcon();
}
}
COM: <s> helper method used to populate a menu label in the most minimal manner </s>
|
funcom_train/20749952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeChild( NodeHandle child, ScribeMessage msg ) {
boolean result;
result = m_children.remove( child );
// Reflect this child in the distinctChildrenTable
// maintained by scribe.
m_scribe.removeChildForTopic(child, this.getTopicId());
m_scribe.childObserver(child, this.getTopicId(), false, msg);
return result ;
}
COM: <s> removes a node from the set of children in </s>
|
funcom_train/26228569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addClass(CClass clazz) throws UnpositionedError {
if (localClasses == null) {
localClasses = new Hashtable();
}
Object old = localClasses.put(clazz.getIdent(), clazz);
if (old != null) {
throw new UnpositionedError(KjcMessages.CLAZZ_RENAME, clazz.getIdent());
}
}
COM: <s> add local class </s>
|
funcom_train/19618096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadMenus(Reader reader_) {
if (_parser == null)
return;
_parser.setDocumentHandler(this);
try {
_parser.parse(new InputSource(reader_));
} catch (SAXException ex) {
G.debug("Parse error: " + ex.getMessage());
} catch (Exception ex) {
G.debug("SaxMenuFactory.loadMenus(): " + ex.getClass().getName() +
ex.getMessage());
ex.printStackTrace();
}
}
COM: <s> load menus from a reader </s>
|
funcom_train/20899753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getVoxelValue(int x, int y, int z) {
int a = (x + this.x * y + this.x * this.y * z);
byte b = image[a / Byte.SIZE];
int i = a % Byte.SIZE;
return (byte) (b >> (Byte.SIZE - 1 - i) & 0x01);
}
COM: <s> returns the voxel value at position x y z </s>
|
funcom_train/29027286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addKeyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_KeyValue_Key_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_KeyValue_Key_feature", "_UI_KeyValue_type"),
DbdesignerPackage.Literals.KEY_VALUE__KEY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the key feature </s>
|
funcom_train/4786133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawBevelRect(GC gc, int x, int y, int w, int h, Color topleft, Color bottomright) {
gc.setForeground(bottomright);
gc.drawLine(x+w, y, x+w, y+h);
gc.drawLine(x, y+h, x+w, y+h);
gc.setForeground(topleft);
gc.drawLine(x, y, x+w-1, y);
gc.drawLine(x, y, x, y+h-1);
}
COM: <s> draw a rectangle in the given colors </s>
|
funcom_train/41230315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHtml() throws Exception {
HtmlElement html = (HtmlElement) page;
assertEquals("html", html.getTagName());
assertEquals("http://www.w3.org/1999/xhtml", html.getAttributeValue("xmlns"));
// TODO: verify the "lang" attribute
// TODO: verify the "xml:lang" attribute
}
COM: <s> p verify the presence and contents of an html element </s>
|
funcom_train/36951285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(IVMInstall realVM) {
setName(realVM.getName());
setInstallLocation(realVM.getInstallLocation());
setLibraryLocations(realVM.getLibraryLocations());
if (realVM instanceof IVMInstall2) {
IVMInstall2 vm2 = (IVMInstall2) realVM;
setVMArgs(vm2.getVMArgs());
fRubyVersion = vm2.getRubyVersion();
} else {
setVMArguments(realVM.getVMArguments());
fRubyVersion = null;
}
}
COM: <s> initializes the settings of this standin based on the settings in the given </s>
|
funcom_train/12306493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void goUpDir() throws IOException, ServerException {
try {
controlChannel.execute(Command.CDUP);
// alternative: changeDir("..");
} catch (FTPReplyParseException rpe) {
throw ServerException.embedFTPReplyParseException(rpe);
} catch (UnexpectedReplyCodeException urce) {
throw ServerException.embedUnexpectedReplyCodeException(
urce,
"Server refused changing current directory");
}
}
COM: <s> changes remote current working directory to the higher level </s>
|
funcom_train/26226990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dup2_x1() {
QOperand var1 = (QOperand) stack.pop();
if (var1.getType() != Constants.TYP_LONG &&
var1.getType() != Constants.TYP_DOUBLE) {
QOperand var2 = (QOperand) stack.pop();
QOperand var3 = (QOperand) stack.pop();
stack.push(var2);
stack.push(var1);
stack.push(var3);
stack.push(var2);
} else {
QOperand var2 = (QOperand) stack.pop();
stack.push(var1);
stack.push(var2);
}
stack.push(var1);
}
COM: <s> simulate the instruction dup2 x1 on the stack </s>
|
funcom_train/40338838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateRelations(GraphModel subview) {
Set<GraphNode> subviewNodes = subview.getNodesSet();
GraphBuilder builder = subview.getBuilder();
for (GraphEdge edge : getEdges()) {
if (subviewNodes.contains(edge.getHead()) &&
subviewNodes.contains(edge.getTail())) {
builder.addEdge(edge);
}
}
}
COM: <s> populate the subview with every edge in this graph </s>
|
funcom_train/31910357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendGroup(Element group, DOMGroupManager groupManager){
topLevelGroup.appendChild(group);
int nManagers = groupManagers.size();
for(int i=0; i<nManagers; i++){
DOMGroupManager gm = (DOMGroupManager)groupManagers.elementAt(i);
if( gm != groupManager )
gm.recycleCurrentGroup();
}
}
COM: <s> when a group is appended to the tree by this call all the </s>
|
funcom_train/25332778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSetModificationDate() {
DAFeature instance = new DAFeatureImpl();
assertNull(instance.getModificationDate());
Date d = Calendar.getInstance().getTime();
instance.setModificationDate(d);
assertEquals(d,instance.getModificationDate());
}
COM: <s> test of get modification date method of class dafeature </s>
|
funcom_train/9558563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MailData getMailMessage(long emailId) throws MailLoadingException {
try {
MailData m = loadMailMessage(emailId);
return m;
} catch (SQLException se){
System.out.println("SQLException in getMailMessage: " + se.getMessage());
System.out.println(se.getCause());
se.printStackTrace();
throw new MailLoadingException("SQLException in getMailMessage: " + se.getMessage());
}
}
COM: <s> gets the entire body of the mail </s>
|
funcom_train/39560510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkObject(Object p_Obj, int p_Num) {
if (p_Obj == null)
throw new IllegalArgumentException(p_Num + ". Parameter is null!");
if ((p_Obj instanceof String) && !Validator.isStringOK((String) p_Obj))
throw new IllegalArgumentException(p_Num + ". Parameter is empty!");
}
COM: <s> method used to check whether the given object isnt null </s>
|
funcom_train/42089348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CodeFragment_text_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CodeFragment_text_feature", "_UI_CodeFragment_type"),
DecModelPackage.Literals.CODE_FRAGMENT__TEXT,
true,
true,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the text feature </s>
|
funcom_train/46764732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getStopButton() {
if (stopButton == null) {
stopButton = new JButton();
stopButton.setIcon(stopButtonIcon);
stopButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if (thread != null){
thread.stopReplay();
pause = false;
}
}
});
}
return stopButton;
}
COM: <s> this method initializes stop button </s>
|
funcom_train/50141716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShort(int parameterIndex, short x) throws SQLException{
try{
ps.setShort(parameterIndex, x);
}
catch (SQLException sqlex){
log.debug(getLogString() + " Exception: " + sqlex);
throw sqlex;
}
setContent(parameterIndex, String.valueOf(x));
}
COM: <s> sets the designated parameter to a java code short code value </s>
|
funcom_train/17681130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StateManagerImp getStateManager(PersistenceCapable pc) {
StateManagerImp em = null;
try {
Field f = pc.getClass().getDeclaredField("jdoStateManager");
f.setAccessible(true);
em = (StateManagerImp) f.get(pc);
} catch (Exception e) {
e.printStackTrace(System.out);
}
return em;
}
COM: <s> try and obtain the entitymanager for the pc instance </s>
|
funcom_train/26131881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayText(final String string) {
Form form = new Form("Plain Text");
StringItem strItem = new StringItem("Plain Text", string);
form.append(strItem);
Command exitCommand = new Command("Exit", Command.EXIT, 0);
form.addCommand(exitCommand);
form.setCommandListener(this);
Display.getDisplay(this).setCurrent(form);
}
COM: <s> display the example plain text </s>
|
funcom_train/33717634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void joinLine(Line line) {
int il = line.index();
DOM.removeChild(tbody, getTr(il + 1));
v.remove(il + 1);
resizeLine(line, il);
for (int i = il + 1; i < v.size(); i++) {
DOM.setInnerHTML(getDiv(i), "" + (i + 1));
}
setWidth();
}
COM: <s> a line has been join removed either through del or backspace </s>
|
funcom_train/25108769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getRectangle(String name) {
String[] values = getProperty(name).split(",");
return new Rectangle(
Integer.valueOf(values[0].trim()),
Integer.valueOf(values[1].trim()),
Integer.valueOf(values[2].trim()),
Integer.valueOf(values[3].trim()));
}
COM: <s> gets a rectangle property value </s>
|
funcom_train/8859920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveGuidoFile(String fileName, String title, String composer) throws IOException {
String guidoContent = "";
int i;
for (i = 0; i < this.outputManager.pieceNotationArray.length; i++)
guidoContent += this.outputManager.pieceNotationArray[i].toGuidoString(title, composer);
if (this.outputManager.getTestNotationError()) guidoContent += "}";
COM: <s> saves the guido notation to a file </s>
|
funcom_train/10655935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLayoutRemoved() {
View[] dummy = new View[] { new PlainView(p1L), new PlainView(p1) };
view.replace(0, view.getViewCount(), dummy);
assertEquals(2, view.getViewCount());
view.layoutSpan = Integer.MAX_VALUE;
view.strategy.layout(view);
assertEquals(1, view.getViewCount());
}
COM: <s> tests that old children contained are removed from </s>
|
funcom_train/22948981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createPanel(JSlider slider, int multiplication, String text) {
JPanel p1 = new JPanel();
p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS));
p1.add(slider);
ChangeListener s1 = new SliderListener(p1, text, multiplication);
slider.addChangeListener(s1);
s1.stateChanged(new ChangeEvent(slider));
return p1;
}
COM: <s> returns jpanel with a slider </s>
|
funcom_train/18643403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CategoryEditPart findCategory(Object obj) {
CategoryEditPart ret=null;
java.util.Iterator iter=getChildren().iterator();
while (ret == null && iter.hasNext()) {
Object subobj=iter.next();
if (subobj instanceof CategoryEditPart) {
Category cat=((CategoryEditPart)subobj).getCategory();
if (cat.isCategoryFor(obj)) {
ret = (CategoryEditPart)subobj;
}
}
}
return(ret);
}
COM: <s> this method locates the category edit part associated with </s>
|
funcom_train/25664205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getColourPref(final String key) {
int intValue;
String str = "";
this.reading.lock();
try {
str = this.properties.getProperty(key.toLowerCase());
} finally {
this.reading.unlock();
}
try {
intValue = Integer.parseInt(str, 16);
} catch (final NumberFormatException e) {
try {
intValue = Integer.parseInt(this.defaults.getProperty(key.toLowerCase()), 16);
} catch (final NumberFormatException e2) {
intValue = 0xFFFFFFFF;
}
}
return new Color(intValue, true);
}
COM: <s> retrieves a colour configuration option </s>
|
funcom_train/26330079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector get_results_from_stream(InputStream stream)
{csv_reader reader = null;
Vector temp_row = null;
try
{
reader = new csv_reader(stream);
}
catch (Exception e)
{
return null;
}
//data_metaData = reader.get_metadata();
//set_names(((csv_metadata) data_metaData).get_names());
Vector new_data = new Vector();
int ctr = 0;
{
try
{
while ( (temp_row = reader.read_vec_proper_type()) != null)
new_data.addElement(temp_row);
}
catch (Exception ex )
{
return null;
}
}
return new_data;
}
COM: <s> set data from inputstream from a servlet etc </s>
|
funcom_train/49319835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PlanarImage makeLookupTable(PlanarImage im, double lowCut, double highCut) {
im = scaleToShortRange(im, lowCut, highCut);
lookupArray = new byte[lookupSize];
lookupTable = new LookupTableJAI(lookupArray, lookupOffset);
return im;
}
COM: <s> create an empty lookup table for the given image and scale the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.