__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/33606599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCrossed() {
System.out.println("crossed");
assertEquals(true,instance1.crossed(4,5));
assertEquals(false,instance1.crossed(1,7));
assertEquals(false,instance1.crossed(2,3));
assertEquals(false,instance1.crossed(7,8));
assertEquals(true,instance1.crossed(6,7));
}
COM: <s> test of crossed method of class scio </s>
|
funcom_train/26021636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ContentProviderOperation modifyCapabilityTimestampForContact(long rawContactId, String rcsNumber, long timestamp){
return ContentProviderOperation.newUpdate(Data.CONTENT_URI)
.withSelection(Data.RAW_CONTACT_ID + "=?" + " AND " + Data.MIMETYPE + "=?" + " AND " + Data.DATA1 + "=?", new String[]{Long.toString(rawContactId), MIMETYPE_CAPABILITY_TIMESTAMP, rcsNumber})
.withValue(Data.DATA2, timestamp)
.build();
}
COM: <s> modify the rcs capability timestamp for the contact </s>
|
funcom_train/5399634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test009Bad() {
field = form.getField("field_003");
try {
validateField(new String[] { "a", "b", "c", "d", "e", "f" });
fail(MSG_001);
} catch (ValidateException ve) {
checkErrorCode(2);
}
}
COM: <s> field 003 array of length greater than 5 </s>
|
funcom_train/22087095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ErrorReporter setErrorReporter(ErrorReporter reporter) {
ErrorReporter result = errorReporter;
Object[] array = listeners;
if (array != null && errorReporter != reporter) {
firePropertyChangeImpl(array, errorReporterProperty,
errorReporter, reporter);
}
errorReporter = reporter;
return result;
}
COM: <s> change the current error reporter </s>
|
funcom_train/24130535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Packet takePacketFromSource(Source s, long elapsedTime) {
//Decrease the time remaining for the packet to be transmitted
s.interArTime -= elapsedTime;
Packet p = null;
if (s.interArTime <= 0) {
if (s.packetToBeTransmittedID != -1) {
p = new Packet();
p.length = s.pktLength;
p.generationTime = MobileNode.timer;
p.id = s.packetToBeTransmittedID;
}
s.getNextPacket();
}
return p;
}
COM: <s> decreases the interarrival timer of a source and creates a new packet if </s>
|
funcom_train/46840235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(SVGImage image) {
// m_tloris = image.m_tloris;
m_shapes = image.m_shapes;
m_subImages = image.m_subImages;
m_translation = image.m_translation;
m_rotation = image.m_rotation;
m_scale = image.m_scale;
}
COM: <s> assigns only references of members does not clone </s>
|
funcom_train/18345520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void encodeColorPrefs(String key, Color color) throws NumberFormatException {
prefs.setProperty(key + "R", String.valueOf(color.getRed()));
prefs.setProperty(key + "G", String.valueOf(color.getGreen()));
prefs.setProperty(key + "B", String.valueOf(color.getBlue()));
prefs.setProperty(key + "A", String.valueOf(color.getAlpha()));
prefsChanged = true;
}
COM: <s> method that encodes a color preference into the properties list from the object </s>
|
funcom_train/40448485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawMyNodes() {
// System.err.print(" drawMyNodes");
Enumeration eno= graph.enumNodes();
while (eno.hasMoreElements()) {
Node n= (Node)eno.nextElement();
paintNode(offgraphics, n, render);
//System.err.print(" "+n.color);
}
//System.err.println(" <== colors");
}
COM: <s> draws all nodes in the graph </s>
|
funcom_train/35095504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGestureManager() {
gestureManager = new SwingGestureManager("Test Manager");
gestureManager.addMouseModifier(MouseEvent.BUTTON3);
gestureManager.addGestureListener(this);
gestureManager.addGestureListener(new MouseMovementRecorder());
gestureManager.registerComponent((JComponent) getGlassPane());
}
COM: <s> initialises the code gesture manager code </s>
|
funcom_train/9958101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage filter(BufferedImage image, BufferedImage output) {
if (kernel == null) {
throw new IllegalArgumentException("kernel not set.");
}
// Verify our output image
output = verifyOutput(output, image);
// Set up the convolution operation
BufferedImageOp operation = new ConvolveOp(kernel);
// Filter and return the image
return operation.filter(image, output);
}
COM: <s> convolve the image using the kernel </s>
|
funcom_train/34480271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int find_instance_id(int left, int right, long key) throws SdaiException {
while (left <= right) {
int middle = (left + right)/2;
if (inst_idents[middle] < key) {
left = middle + 1;
} else if (inst_idents[middle] > key) {
right = middle - 1;
} else {
return middle;
}
}
return -1;
}
COM: <s> given an instance identifier finds its position in the sorted array </s>
|
funcom_train/21739763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToken(TextAttributesKey key) {
if (!fNeedsLazyColorLoading) {
// Store token without a color
fTokenMap.put(key.propertyNameColor, new Token(createTextAttribute(key)));
} else {
// Gets token and set it's color value
Token token= fTokenMap.get(key.propertyNameColor);
if (token != null) {
token.setData(createTextAttribute(key));
}
}
}
COM: <s> creates all field for the token </s>
|
funcom_train/23050180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SComponent getComponent() {
if (component == null) {
layouter = initLayout(createLayoutInstruction());
layouter.addVisibilityListener(this);
component = layouter.build(getComponentProvider());
environment.setContentPane(component);
initializeForm();
if (object != null)
visibilityChanged(layouter.getVisibles());
}
return component;
}
COM: <s> lazily construct the details component according to the provided layouter and bean meta </s>
|
funcom_train/8462039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getElementColor(byte scoreElement) {
Object ret = m_attributes.get("COLOR_"+Byte.toString(scoreElement));
if (ret == null) {
ret = m_attributes.get("COLOR_"+Byte.toString(ScoreElements._DEFAULT));
if (ret == null)
return null; //No default color set
}
return (Color) ret;
}
COM: <s> returns the color of the given element </s>
|
funcom_train/33745268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float readCurrent(double gain, int averages) throws LJException {
int channel = mParameters.getInt(CHAN_I_IN);
float voltage = this.read(channel, gain, averages);
float R = (float) mParameters.getDouble(Labjack.AMMETER_RESISTANCE);
// Current is the voltage read over the resistance
// But we'd like it in milliamps please
return 1000 * voltage / R;
}
COM: <s> read from the current in pins </s>
|
funcom_train/9860773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handleArrayWrite(final Object pArray, final Object pIndex, final Object pValue) throws HandlerException {
if (pArray instanceof IndexedAccess) {
return ((IndexedAccess) pArray).set((Integer) pIndex, pValue);
}
throw new HandlerException("The default implementation does not support array access");
}
COM: <s> evaluate the writing to an array element </s>
|
funcom_train/28473558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getIdealMafPanel() {
if (idealMafPanel == null) {
idealMafLabel = new JLabel();
idealMafLabel.setText("Ideal MAF (0-0.5):");
idealMafLabel.setPreferredSize(new Dimension(180, 16));
idealMafPanel = new JPanel();
idealMafPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
idealMafPanel.add(idealMafLabel, null);
idealMafPanel.add(getIdealMafTextField(), null);
}
return idealMafPanel;
}
COM: <s> this method initializes ideal maf panel </s>
|
funcom_train/49066315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public int removePath(String label) {
if (!pathSet.containsKey(label)) {
return -1;
}
HashSet cov = (HashSet) pathSet.get(label);
Iterator it = cov.iterator();
while (it.hasNext()) {
Requirement req = (Requirement) it.next();
Integer ki = (Integer) required.get(req);
required.put(req, new Integer(ki.intValue() - 1));
}
pathSet.remove(label);
return cov.size();
}
COM: <s> remove a given path </s>
|
funcom_train/37072016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String highlight(String body_text) {
StringBuffer highlightedBody = new StringBuffer();
TagTokenizer tagTokenizer = new TagTokenizer();
tagTokenizer.tokenize(body_text);
while (tagTokenizer.hasNext()) {
if (tagTokenizer.tokenType() == TagTokenizer.TAG_TYPE) {
highlightedBody.append(tagTokenizer.next());
} else {
highlightedBody.append(highlightPureText(tagTokenizer.next()));
}
}
return highlightedBody.toString();
}
COM: <s> given body text returns that text with html color tags around </s>
|
funcom_train/21877631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getXformUris(InstanceRef target) throws DepoException {
Model m = getKnowledgeMap().readlockXforms();
try {
XformDetailQuery xdq = new XformDetailQuery(getKnowledgeMap(), m, target);
Collection c = xdq.execUris();
return c;
} finally {
getKnowledgeMap().unlockXforms();
}
}
COM: <s> get the uris of xforms used by the given instance </s>
|
funcom_train/13675979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void end() {
if (isAuthenticated()) {
//store new last login
m_Preferences.setLastLogin(m_LastLogin);
//save actual preferences
try {
savePreferences();
} catch (JwmaException ex) {
}
//end mailsession
endMailSession();
//remove Jwma session bean
removeSessionBean(CoreGlobals.SESSION_BEAN);
}
}//end
COM: <s> ends this session by cleaning up user related data </s>
|
funcom_train/33849952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDottedMethodSig() {
if (!visitingMethod)
throw new IllegalStateException("getDottedMethodSig called while not visiting method");
if (dottedMethodSig == null)
dottedMethodSig = getMethodSig().replace('/', '.');
return dottedMethodSig;
}
COM: <s> if currently visiting a method get the methods dotted method signature </s>
|
funcom_train/25761734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.add(getJPanel1(), BorderLayout.CENTER);
jPanel.add(getJJToolBarBar(), BorderLayout.SOUTH);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/1316958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendClientData(ClientData clientData) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
// serialize object
byte cd[] = clientData.toByteArray();
// put message type, length and body to a buffer
dos.writeInt(MessageType.CLIENT_DATA);
dos.writeInt(cd.length);
dos.write(cd);
// send message
baos.writeTo(os);
}
COM: <s> sent a client data message to the server </s>
|
funcom_train/47301473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasReturnStatementAlready(MethodInvocation node) {
// No return statement found
if (this.firstReturnStatement == null) {
return false;
}
// Check whether node is in this return statement or not
ASTNode astNode = node;
while (astNode.getParent().getNodeType() != ASTNode.METHOD_DECLARATION) {
if (astNode.getParent() == firstReturnStatement) {
return false;
}
astNode = astNode.getParent();
}
return true;
}
COM: <s> return tt true tt if there are return statements before the specified </s>
|
funcom_train/50911859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOfSmallestElementInColumn(int jcol) throws EuclidRuntimeException {
checkColumn(jcol);
int imin = -1;
double min = Double.POSITIVE_INFINITY;
for (int irow = 0; irow < rows; irow++) {
if (min > flmat[irow][jcol]) {
min = flmat[irow][jcol];
imin = irow;
}
}
return imin;
}
COM: <s> get index of smallest element in column </s>
|
funcom_train/8910914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNewAppId() {
DBConnector db = new DBConnector();
CachedRowSet crs = null;
String SQL = "select seqappid.nextval appid from dual ";
String appid="";
try {
crs = db.executeQuery(SQL);
while(crs.next()){
appid= crs.getString("appid");
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
try{
if(crs!=null)crs.close();
}catch(SQLException e){
debug(5, e.getMessage());
}
}
return appid;
}
COM: <s> this function returns new app id </s>
|
funcom_train/18641327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadProject(Project project) {
LOGGER.debug("loadProject()");
if (project == null) return;
MutableTreeNode node = getTreeNode(project);
treeModel.insertNodeInto(node, (MutableTreeNode)treeModel.getRoot(),((TreeNode)treeModel.getRoot()).getChildCount());
}
COM: <s> loads new and existing projects into the tree panel </s>
|
funcom_train/37062871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserHeightDistanceProgram getProgramByNumber( int progNumber ) {
Iterator it = userPrograms.iterator();
while (it.hasNext()) {
IErgoProgram uhdp = (IErgoProgram)it.next();
if (uhdp.getNumber() == progNumber) {
return (UserHeightDistanceProgram)uhdp;
}
}
return null;
}
COM: <s> returns a reference to the user height distance program with the given number </s>
|
funcom_train/28146063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GameOptions load() {
try {
loadProperties();
} catch (IOException e) {
_logger.info("Game Options are not set up, using defaults instead");
return new GameOptions();
}
GameOptions go = new GameOptions();
go.setBidType(BidType.valueOf(getProperty(BID_TYPE, go.getBidType().toString())));
go.setGameSpeed(GameSpeed.valueOf(getProperty(GAME_SPEED, go.getGameSpeed().toString())));
return go;
}
COM: <s> document the load method </s>
|
funcom_train/18586676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findBogey(int bogeySide, int id) {
for (int i = 0; i < taskForceArraySize; ++i) {
if (null != taskForces[bogeySide][i]
&& id == taskForces[bogeySide][i].getBogeyId()) {
return i;
}
}
return -1;
}
COM: <s> finds which hostile tf has a certain bogey number </s>
|
funcom_train/44451388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSouthColor(int color) throws IllegalArgumentException, IllegalStateException {
if (hasCorrectColoringLimits()) {
if (color >= 0 && color < numVerticalColors) {
southColor = color;
} else {
throw new IllegalArgumentException("The color must be between 0 and " +
(numVerticalColors - 1));
}
} else {
throw new IllegalStateException("The coloring limits must be set first");
}
}
COM: <s> sets the south edge color of this tile </s>
|
funcom_train/50242277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParticipantSnapshot getData() {
return new ParticipantSnapshot( getMemberId(), getRowingId(),
getParticipantId(), getSeatPreference(), getReplacesId(),
getInitialSeatId(), getFinalSeatId(), getAttendance() );
}
COM: <s> return a bare naked snapshot </s>
|
funcom_train/29985715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void filterHTML (HTMLBlock block) {
List<Token> tokens = block.getTokens ();
int tsize = tokens.size ();
for (int i = 0; i < tsize; i++) {
Token t = tokens.get (i);
switch (t.getType ()) {
case Token.TAG:
Tag tag = t.getTag ();
handleTag (tag, block, i);
}
}
}
COM: <s> iterate over all tags and call handle tag on them </s>
|
funcom_train/50066604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|40-getter|0|40-preInit
// write pre-init user code here
exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|40-getter|1|40-postInit
// write post-init user code here
}//GEN-BEGIN:|40-getter|2|
return exitCommand;
}
COM: <s> returns an initiliazed instance of exit command component </s>
|
funcom_train/32355770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deletePrj() {
boolean deleteIt;
deleteIt = areYouSure();
if (deleteIt) {
Project selectedProject = treeController.getSelectedPrj();
boolean allowed = selectedProject.getProjectBO().deleteProject();
if (allowed) {
treeController.removePrj(selectedProject);
// notify user
MailAdapter.notifyUser(MsgTemplateConstants.PRJ_DEL_TMPL,
selectedProject.getNodeText(), new Date(),
LoginController.getLoggedUserSignature());
}
}
}
COM: <s> prompts the user if its sure about the project deletion calls remove prj </s>
|
funcom_train/24428613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getRecPartsOldVDRFormat(File path) {
int count = 1;
while (count < 1000) {
File recPart = RecordingFormat.getAbsolutePath(path, count, false);
if (!recPart.exists()) {
if (count == 1) {
return -1;
}
// return count - 1
return --count;
}
count++;
}
return -1;
}
COM: <s> count parts of a recording </s>
|
funcom_train/40729840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ConfigureResponse getErrorResponse(String error) {
StringBuilder buffer = new StringBuilder(
"<tr><td colspan=\"2\"><font color=\"red\">");
buffer.append(error); // FIXME: HTML escaping?
buffer.append("</font></td></tr>");
return new ConfigureResponse(null, buffer.toString());
}
COM: <s> returns a form snippet containing the given string as an error message </s>
|
funcom_train/44627047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitially5() {
helpTCF("A.java"," class A { int k; boolean b; Boolean bb; \n//@ static initially b;\n}"
,"/A.java:2: non-static variable b cannot be referenced from a static context",22
);
}
COM: <s> tests initially may be static </s>
|
funcom_train/9759050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uninstall() {
if (fIsInstalled) {
if (fSourceViewer instanceof ITextViewerExtension) {
ITextViewerExtension e= (ITextViewerExtension) fSourceViewer;
e.removeVerifyKeyListener(this);
} else if (fSourceViewer != null) {
StyledText text= fSourceViewer.getTextWidget();
if (text != null && !text.isDisposed())
text.removeVerifyKeyListener(fActivationCodeTrigger);
}
fIsInstalled= false;
fKeyBindingService= null;
}
}
COM: <s> uninstalls this trigger from the editors text widget </s>
|
funcom_train/50398981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPEMEncodedProxyCert(String delegationID)throws Exception{
StringWriter sb=new StringWriter();
PEMWriter pw=new PEMWriter(sb);
String proxyKSPassword = kernel.getProperty(
PROXY_KEYSTORE_PASSWORD, PROXY_KEYSTORE_PASSWORD_DEFAULT);
Certificate[]chain=proxyKeystore.getCertificateChain(delegationID);
pw.writeObject(chain[0]);
pw.writeObject(proxyKeystore.getKey(delegationID, proxyKSPassword.toCharArray()));
pw.writeObject(chain[1]);
pw.flush();
return sb.toString();
}
COM: <s> get a pem encoded proxy for use by grid ftp </s>
|
funcom_train/46294178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(ImageChannel channel, byte[] byteArray) {
// type
channel.setType(getPixelType(byteArray));
// plinear
channel.setPLinear(getPLinear(byteArray));
// reserved
channel.setReserved(getReserved(byteArray));
// xsample
channel.setXSampling(getXSampling(byteArray));
// ysample
channel.setYSampling(getYSampling(byteArray));
}
COM: <s> sets up the channel with provided byte array </s>
|
funcom_train/1796977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDimensions(String dimensions) {
// check if setting to existing value
if (this.dimensions == null ? dimensions != null :
!this.dimensions.equals(dimensions)) {
// set to new value for customer parameter
this.dimensions = dimensions;
setStringCustomParameter("dimensions", dimensions);
}
}
COM: <s> sets the comma separated list of row keys </s>
|
funcom_train/43298516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetFinalState() {
this.assertEquals(false, state2.isFinalState());
state2.setFinalState(true);
state2.setTokenType(new TokenType("<x|y>", "x|y", 0, false));
this.assertEquals(true, state2.isFinalState());
}
COM: <s> test of set final state method of class state </s>
|
funcom_train/18052186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSvFileNewMenuItem() {
if (svFileNewMenuItem == null) {
svFileNewMenuItem = new JMenuItem();
svFileNewMenuItem.setText("New");
svFileNewMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
newFileAction();
}
});
}
return svFileNewMenuItem;
}
COM: <s> this method initializes svfile new menu item </s>
|
funcom_train/20874409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBestNrAssigned() {
int nrAssigned = 0;
for (int i = 0; i < iBestAssignment.length; i++)
if (iBestAssignment[i] != null)
nrAssigned += (iBestAssignment[i].isCourseRequest() ? 10 : 1);
return nrAssigned;
}
COM: <s> number of requests assigned in the best schedule </s>
|
funcom_train/47320915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dealPot() {
if (players.size() == 1) {
// all fold, one winner for the whole pot
PlayerWrapper winner = players.get(0);
logger.info("{} is alone and wins the whole pot {}", winner, pot.getTotal());
winnings.add(winner, pot.getTotal());
} else {
dealPotBetweenWinners();
}
moveWinningsToStacks();
}
COM: <s> deal pot between winners </s>
|
funcom_train/18104142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(Layer l, int index) {
/* Check for correct arguments: index in bounds */
if ((index < 0) || (index > nlayers)) {
throw new IndexOutOfBoundsException();
}
// if the Layer is already present
// remove it
// will throw NullPointerException if the Layer is null
removeImpl(l);
// insert it at the specified index
addImpl(l, index);
}
COM: <s> inserts a new layer in this layer manager at the specified index </s>
|
funcom_train/26557873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrefix() {
String dir = PathNormalizer.normalize(new File(".")).getAbsolutePath();
if (tildeValue != null) {
if (dir.equals(tildeValue)) dir="~"+File.separator;
else if (dir.startsWith(tildeValue)) dir="~"+File.separator+dir.substring(tildeValue.length());
}
return dir;
}
COM: <s> return a string to prefix to the stream lines </s>
|
funcom_train/28211975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTFlanSpeed() {
if (jTFlanSpeed == null) {
jTFlanSpeed = new JTextField();
jTFlanSpeed.setPreferredSize(new Dimension(221, 19));
jTFlanSpeed.setBounds(new Rectangle(183, 21, 221, 15));
}
return jTFlanSpeed;
}
COM: <s> this method initializes j tflan speed </s>
|
funcom_train/38529312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumber(final int num) {
if (NUMBER_MAP.containsKey(num)) {
final AbstractHistogram collider = NUMBER_MAP.get(num);
if (!collider.equals(this)) {
collider.assignNewNumber();
}
}
NUMBER_MAP.remove(number);
number = num;
NUMBER_MAP.put(num, this);
}
COM: <s> sets the number of this histogram </s>
|
funcom_train/14660866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultField getLogTextField() {
if (logTextField == null) {
logTextField = new ResultField();
logTextField.setBorder(BorderFactory.createTitledBorder(null,
"Log", TitledBorder.DEFAULT_JUSTIFICATION,
TitledBorder.DEFAULT_POSITION, new Font("Dialog",
Font.BOLD, 12), new Color(51, 51, 51)));
}
return logTextField;
}
COM: <s> this method initializes log text field </s>
|
funcom_train/2368377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
fMatchCount = 0 ;
if ( fRootContainer == null ) {
fRootContainer = new MatchContainer (null,
new File (fQuery.getTopFolder()).toURI(),
fQuery.getTopFolder(),
MatchContainer.ROOT );
} else {
fRootContainer.setMatchCount(0);
fRootContainer.reset () ;
}
}
COM: <s> clears initialises the root container of this results instance </s>
|
funcom_train/30190920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startPacketCapture( ) {
openDBConnection( DEFAULT_EMBEDDED_DB_DIR + File.separator + DEFAULT_EMBEDDED_DB_FILE );
try {
this.m_pcap = new PacketCapture();
}
catch ( Exception ex ) {
TNVErrorDialog.createTNVErrorDialog(this.getClass(), "Unable to start packet capture", ex);
}
this.captureDialog = TNVCaptureDialog.createTNVCaptureDialog(this);
}
COM: <s> start packet capture </s>
|
funcom_train/35947667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (_data != null) { // Primitive.
return new String(_data, 0, _count);
} else { // Composite.
char[] data = new char[_count];
this.getChars(0, _count, data, 0);
return new String(data, 0, _count);
}
}
COM: <s> returns the code string code representation of this text </s>
|
funcom_train/2806220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addNonProductItem(GenericDelegator delegator, String itemType, String description, String categoryId, double price, double quantity, Map attributes, String prodCatalogId, LocalDispatcher dispatcher) throws CartItemModifyException {
return this.addItem(0, ShoppingCartItem.makeItem(new Integer(0), delegator, itemType, description, categoryId, price, quantity, attributes, prodCatalogId, dispatcher, this, true));
}
COM: <s> add a non product item to the shopping cart </s>
|
funcom_train/22356195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUseSyntaxHighlighting(boolean bool) {
if (highlightSyntax != bool) {
highlightSyntax = bool;
if (bool) {
errorColor = Colors.decode(settings.getProperty("OrderEditor.errorBgColor", "255,128,0"));
} else {
errorColor = getBackground();
}
formatTokens();
}
}
COM: <s> enable or disable syntax highlighting </s>
|
funcom_train/3815496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isComponentProperty (String classname, String propname){
ConfigurableProperty cp = getProperty(classname,propname);
if(cp != null){
PropertyType type = cp.getType();
if (type != null && type.toString().startsWith("Component"))
return true;
}
return false;
}
COM: <s> check if this property requires a component with particular class type </s>
|
funcom_train/49943750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getDialogTitle() {
String shellLabel = ""; //$NON-NLS-1$
String itemLabel = getItem().getLabel();
if (itemLabel != null && itemLabel.length() > 0) {
shellLabel = Messages.Insert_Template___1 + " " + itemLabel; //$NON-NLS-1$
} else {
shellLabel = Messages.Insert_Template_2;
}
return shellLabel;
}
COM: <s> returns the dialog title to use </s>
|
funcom_train/24114767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer lireContenuFichier(File src){
StringBuffer sb = new StringBuffer();
try{
FileInputStream filein = new FileInputStream(src);
BufferedReader file = new BufferedReader(new InputStreamReader(filein));
try{
String s;
s = file.readLine();
while (s!=null){
sb.append(s+"\n");
s = file.readLine();
}
}catch(IOException exc){
System.out.println("erreur :"+exc.getMessage());
}
}catch(FileNotFoundException exc ){
System.out.println("erreur :"+exc.getMessage());
}
return sb;
}
COM: <s> read the file and put it in a string buffer </s>
|
funcom_train/29864549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addService(Service s) {
boolean addResult = list.add(s);
Log log = Log.getInstance();
if (addResult) {
persistenceUpdate();
log.writeToLog("New service installed: " + s.getName() + " URL=" + s.getServiceURI(), Log.INFO);
}
else
log.writeToLog("Failed to install service: " + s.getName() + " URL=" + s.getServiceURI(), Log.WARNING);
return addResult;
}
COM: <s> adds a specified service to the servicelist </s>
|
funcom_train/45622405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void afterPropertiesSet() throws Exception {
System.out.println("SimpleIndexFactoryBean.afterPropertiesSet");
if (getDirectory() == null) {
throw new IllegalArgumentException("directory is required");
}
if (getAnalyzer() == null) {
setAnalyzer(new SimpleAnalyzer());
}
this.factory = new SimpleIndexFactory(getDirectory(), getAnalyzer());
this.factory.setResolveLock(resolveLock);
this.factory.setCreate(create);
}
COM: <s> this method constructs a simple index factory instance based on </s>
|
funcom_train/18008779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeQuery(PreparedStatementCreator psc, ResultSetRowHandler rsrh) throws DataAccessException {
PreparedStatement st=null;
try {
st=psc.createPreparedStatement(sqlConn);
ResultSet rs=st.executeQuery();
while (rs.next()) {
rsrh.handleResultSetRow(rs);
}
}
catch (SQLException e) {
throw new DataAccessException("cannot execute query", e);
}
finally {
if (st!=null) {
try {
st.close();
}
catch (SQLException e) {
throw new DataAccessException("cannot close statement", e);
}
}
}
}
COM: <s> p execute a query </s>
|
funcom_train/28297517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemovePropertyNullVisualProperty() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
Entry entry2 =
dvm.new Entry(IsClassOf.class, Sphere.class, IsClassOf.NAME,
Sphere.NAME);
dvm.set(entry);
dvm.set(entry2);
DataConversion<Integer, Color3f> conversion = createConversion();
dvm.setProperty(Package.class, Package.CLASSES_ATTR,
Sphere.COLOR_ATTRIBUTE, conversion);
try {
dvm.removeProperty(Package.class, null);
} catch (IllegalArgumentException e) {
assertTrue(true);
}
}
COM: <s> test remove property null visual property </s>
|
funcom_train/38529398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String removeExtensionFileName(final String fileNameIn) {
String fileName;
int index;
index = fileNameIn.lastIndexOf('.');
// Extension 3 or less characters, index -1 if not found
if (index > 0) {
if (index >= fileNameIn.length() - 4) {
fileName = fileNameIn.substring(0, index);
} else {
fileName = fileNameIn;
}
} else {
fileName = fileNameIn;
}
return fileName;
}
COM: <s> remove extension from file name </s>
|
funcom_train/50557987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Theme getTheme() {
Theme theme = (Theme) getSessionAttribute(Theme.SESSION_ATTRIBUTE);
if (theme == null || theme.getName() == null) {
theme = new Theme();
theme.setName(CanyamoConfig.getValue(CanyamoConfig.DEFAULT_THEME));
}
return theme;
}
COM: <s> returns the theme used by this user </s>
|
funcom_train/31130889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String fetchString(byte constantEnumeration, int rxLength) {
byte [] stringBytes = new byte[rxLength];
getData(constantEnumeration, stringBytes, rxLength);
// Get rid of everything after 0.
int zeroPos = 0;
for(zeroPos = 0;zeroPos < rxLength;zeroPos++) {
if(stringBytes [zeroPos] == 0) break;
}
String s = new String(stringBytes).substring(0,zeroPos);
return s;
}
COM: <s> helper method for retrieving string constants using i2 c protocol </s>
|
funcom_train/2585440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetItemCount() {
DefaultIntervalXYDataset d = createSampleDataset1();
assertEquals(3, d.getItemCount(0));
assertEquals(3, d.getItemCount(1));
// try an index out of bounds
boolean pass = false;
try {
d.getItemCount(2);
}
catch (IllegalArgumentException e) {
pass = true;
}
assertTrue(pass);
}
COM: <s> some checks for the get item count method </s>
|
funcom_train/2366068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
fgKeys = new Hashtable<String, Integer>();
Integer k = Integer.valueOf(KEY);
String[] keywords;
if (scriptType == Constants.SCRIPT_TYPE_JAVASCRIPT) {
keywords = jsKeyWords;
} else {
keywords = fgKeywords;
}
for (int i = 0; i < keywords.length; i++)
fgKeys.put(keywords[i], k);
}
COM: <s> initialize the lookup table </s>
|
funcom_train/3470477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (isRunning()) {
isRunning = false;
eventListener.stop();
if (currentReplayInputFilter != null) {
currentReplayInputFilter.clear();
currentReplayInputFilter.stop();
}
if (fastForward) {
this.replayMode = oldReplayMode;
oldReplayMode = null;
setFastForward(false);
}
glassPaneManager.setVisible(GlassPaneCompound.PSEUDO_MOUSE_PANE,
false);
glassPaneManager
.setVisible(GlassPaneCompound.MARK_MODE_PANE, false);
currentCompound = null;
fireReplayEvent(new ReplayEvent(this, ReplayEvent.Type.STOPPED));
}
}
COM: <s> stops the replay process </s>
|
funcom_train/1549273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAsEqual(T existingObj, T newObj) {
checkLocked();
Integer position = (Integer) map.get(existingObj);
if (position == null) {
throw new IllegalArgumentException(existingObj + " not known to " + this);
}
Integer result = map.put(newObj, position);
return (result == null);
}
COM: <s> adds a new item which compares as equal to the given existing item </s>
|
funcom_train/45692199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAudioInModePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GlobalParameters_audioInMode_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GlobalParameters_audioInMode_feature", "_UI_GlobalParameters_type"),
EsxPackage.Literals.GLOBAL_PARAMETERS__AUDIO_IN_MODE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the audio in mode feature </s>
|
funcom_train/44850649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String lMessage = (excData().get(ExceptionData.DATA_MSG_KEY) == null)? excData().getMessage() : excData().get(ExceptionData.DATA_MSG_KEY).toString();
return this.getClass().getName() + ": " + lMessage;
}
COM: <s> we override this method to invoke the get message </s>
|
funcom_train/38561134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int effectiveSetLength(int[] pSet) {
int effectiveLength = 0; // number of non-zero elements
int setLength = pSet.length;
for (int i = 0; i < setLength; i++){
if (pSet[i] != 0)
effectiveLength++;
else return effectiveLength;
}
return effectiveLength;
}
COM: <s> find the number of non zero elements in a set </s>
|
funcom_train/46110263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrefix (String uri) {
Enumeration<String> E = table.keys();
String key;
while ( E.hasMoreElements() ) {
key = E.nextElement();
if ( table.get(key).equals(uri) )
return key;
}
if ( uri.equals(XMLConstants.XML_NS_URI))
return XMLConstants.XML_NS_PREFIX;
if ( uri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI) )
return XMLConstants.XMLNS_ATTRIBUTE;
else
return null;
}
COM: <s> gets the prefix for a given namespace uri </s>
|
funcom_train/14462347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void decodeGrbit(){
byte[] grbytes = ByteTools.shortToLEBytes(grbit);
if(((byte)grbytes[0] & 0x10) == 0x10){
collapsed = true;
}else{
collapsed = false;
}
if(((byte)grbytes[0] & 0x20) == 0x20){
hidden = true;
}else{
hidden = false;
}
if(((byte)grbytes[0] & 0x80) == 0x80){
fGhostDirty = true;
}else{
fGhostDirty = false;
}
outlineLevel = (grbytes[0] & 0x07);
}
COM: <s> decodes the grbit and sets values off of its </s>
|
funcom_train/25039791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBodyColor(Color color) {
this.bodyColor[REDINDEX] = ((double) color.getRed() / 255.0f) ;
this.bodyColor[GREENINDEX] = ((double) color.getGreen() / 255.0f) ;
this.bodyColor[BLUEINDEX] = ((double) color.getBlue() / 255.0f) ;
}
COM: <s> set the robots body color </s>
|
funcom_train/19578959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String outputString(StringElement stringElement, int level) {
StringBuilder buf = new StringBuilder();
buf.append(tab(level)).append("<string>").
append((String) ((List) stringElement.getContent()).get(0)).
append("</string>");
return buf.toString();
}
COM: <s> private version of output string string element to support indenting </s>
|
funcom_train/3670873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(jrre.api.java.lang.Class classToLoad){
heap = new Heap();
System.out.println("Loading: ");
CPInfo classEntry = classToLoad.getSymbol(classToLoad.getProperties().getThisClass());
heap.addObject(classEntry, classToLoad);
}
COM: <s> initialises the enviroment loads the class specified and </s>
|
funcom_train/3112085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupDialog() {
pack();
// Set its position
Point ownerLoc = owner.getLocation();
setLocation((ownerLoc.x + (owner.getWidth() / 2)) - (getWidth() / 2),
(ownerLoc.y + (owner.getHeight() / 2)) - (getHeight() / 2));
}
COM: <s> performed before the dialog is shown makes sure that the look is consitent </s>
|
funcom_train/25127614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getMapItemPropertyValue(MapItem item, String name) throws ARINCRuntimeException {
Object value = null;
try {
value = getMapItemObjectProperty((ServerMapItem) item, name);
} catch (IllegalAccessException ex) {
throw new ARINCRuntimeException(ex.getMessage(), ex);
} catch (ServerRuntimeException ex) {
throw new ARINCRuntimeException(ex.getMessage(), ex);
}
return value;
}
COM: <s> get the value of a widget property </s>
|
funcom_train/21080809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void markServerUp(Server server) {
synchronized (_knownServers) {
ServerState state = (ServerState)_knownServers.get(server);
if (state != null && !state.isUp()) {
LOGGER.info("server is up: "+server);
state.setUp(true);
}
}
}
COM: <s> marks the given server as being up </s>
|
funcom_train/25582399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadConfiguration(){
Set<String> extensions = new HashSet<String>();
extensions.add("xml");
Window f = (Window) SwingUtilities.getAncestorOfClass(Window.class, this);
File file = UIUtil.openFile(f, "load the configuration", extensions);
if(file != null){
config.reloadRemoteReasonerConfiguration(file);
ReasonerRegistry registry = HeraklesManager.getReasonerRegistry();
registry.clear();
updateAvailableReasonerPanel();
}
}
COM: <s> load the configuration from the file </s>
|
funcom_train/44329209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getApiTimeout() {
if (INTERFACE_TIMEOUT == null) {
if (PayPalUtil.getConfiguration() != null && PayPalUtil.getConfiguration().containsKey(CONFIG_PAYPAL_API_TIMEOUT)) {
INTERFACE_TIMEOUT = new Integer(PayPalUtil.getConfiguration().getInt(CONFIG_PAYPAL_API_TIMEOUT));
}
else {
INTERFACE_TIMEOUT = new Integer(System.getProperty(PARAM_PAYPAL_API_TIMEOUT, String.valueOf(INTERFACE_DEFAULT_TIMEOUT)));
}
}
return INTERFACE_TIMEOUT.intValue();
}
COM: <s> retrieves the timeout based on the given criteria in the given order </s>
|
funcom_train/17830663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateOutgoingCallPanel() {
if (session == null || session.isClosed()) {
return;
}
else if (session instanceof OutgoingJingleSession) {
showAlert(false);
if (session.getState() instanceof OutgoingJingleSession.Inviting) {
titleLabel.setText("Calling user. Please wait...");
cancelButton.setVisible(true);
}
}
}
COM: <s> updates the ui to reflect the current state </s>
|
funcom_train/45623300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEntryPointPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ResolveManifestFilesType_entryPoint_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ResolveManifestFilesType_entryPoint_feature", "_UI_ResolveManifestFilesType_type"),
MSBPackage.eINSTANCE.getResolveManifestFilesType_EntryPoint(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the entry point feature </s>
|
funcom_train/290201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleRequest(Request request) {
try {
// TODO consider alt lookup by component name
Object service = getService(request);
Method method = getMethod(service, request);
method.invoke(service, getArguments(request));
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
Throwable t = ExceptionUtil.getRootCause(e);
if (t instanceof RuntimeException) {
throw (RuntimeException) t;
} else {
throw new RuntimeException(t);
}
}
}
COM: <s> use reflection to invoke the requested method </s>
|
funcom_train/36470264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void newChecklist(long template_id) {
Checklist cl = getDbHelper().createChecklistFromTemplate(template_id);
if(cl.getID() != -1) {
Intent i = new Intent(this, FillChecklist.class);
i.putExtra(DbAdapter.KEY_TEMPLATE_ID, cl.getID());
startActivity(i);
} else {
// An error occurred creating the checklist. Odd...
}
}
COM: <s> create a new checklist based on a template </s>
|
funcom_train/36659670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAllSessions() {
for (String sessionKey :
BoundNamesUtil.getServiceBoundNamesIterable(
dataService, getSessionPrefix()))
{
ClientSessionInfo sessionInfo =
(ClientSessionInfo) dataService.getServiceBinding(sessionKey);
removeSession(sessionInfo.nodeId, sessionInfo.sessionIdBytes);
}
dataService.markForUpdate(this);
servers.clear();
}
COM: <s> removes all sessions from this channel and clears the list of </s>
|
funcom_train/42992957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Temporary removeIndexes(Temporary temp) {
Temporary tempindex;
Temporary temp2;
IRAssignment arrAsgn;
if( temp.HasIndexTemp() == false) {
return temp;
}
else {
tempindex = removeIndexes(temp.getIndexTemp());
temp2 = new Temporary(getNextTemp(), new IRType(temp.getType().getAtomicType()));
arrAsgn = new AssignArrayElement2Temp(temp2, tempindex, temp);
env.setTemp(temp2);
instructions.add(arrAsgn);
}
return temp2;
}
COM: <s> recursively remove temporaries index within temporary </s>
|
funcom_train/7270066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _appendText (String consoleTxt) {
output.append(consoleTxt);
int excess = output.getDocument().getLength() - idealSize;
if (excess >= maxExcess) {
output.replaceRange("", 0, excess);
}
if (scroll)
output.setCaretPosition(output.getText().length());
}
COM: <s> appends to the console text area </s>
|
funcom_train/46452169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disableFields(XComponent form) {
form.findComponent(LOGIN_FIELD).setEnabled(false);
form.findComponent(PASSWORD_FIELD).setEnabled(false);
form.findComponent(OK_BUTTON).setVisible(false);
form.findComponent(REMEMBER_CHECK_BOX).setVisible(false);
}
COM: <s> disables login fields </s>
|
funcom_train/1241759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
super.destroy();
//if we have had anything to do with creating an axis server
if (axisServer != null) {
//then we lock it
synchronized(axisServer) {
if (axisServer != null) {
//clean it up
axisServer.cleanup();
//and erase our history of it
axisServer =null;
storeEngine(this,null);
}
}
}
}
COM: <s> destroy method is called when the servlet is going away </s>
|
funcom_train/2309271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPandoraBean(PandoraBean pandoraBean) {
if ((pandoraBean != null) && (pandoraBean.getPandora() != null)) {
if (pandoraBean.getPandora() != this.pandora) {
this.pandora = pandoraBean.getPandora();
this.pandoraBean = pandoraBean;
}
} else {
this.pandora = null;
this.pandoraBean = null;
}
}
COM: <s> set the associated pandora bean instance </s>
|
funcom_train/3474932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MultipleMouseClick (Environment env, StructureElement[] children) {
super(env, children);
StructureElement[] filteredChildren = getChildren ("jacareto.struct.MouseClick");
mouseClicks = new MouseClick[filteredChildren.length];
for (int i = 0; i < mouseClicks.length; i++) {
mouseClicks[i] = (MouseClick) filteredChildren[i];
}
this.clickCount = mouseClicks.length;
}
COM: <s> creates a new multiple mouse click structure element </s>
|
funcom_train/8222668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInterceptModels(ButtonModel interceptRequest, ButtonModel interceptResponse) {
interceptRequestCheckBox.setModel(interceptRequest);
interceptRequestCheckBox.setEnabled(true);
interceptRequestCheckBox.setVisible(true);
interceptResponseCheckBox.setModel(interceptResponse);
interceptResponseCheckBox.setEnabled(true);
interceptResponseCheckBox.setVisible(true);
}
COM: <s> sets the intercept models </s>
|
funcom_train/39314458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitComponents() {
System.out.println("testInitComponents");
System.out.print("initComponents method can't be tested independently ");
System.out.print("because the contents of this method is generated ");
System.out.println("by Form Editor. Also it is called by rotate constructor.");
}
COM: <s> test of init components method of class rotate </s>
|
funcom_train/43672329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchEvent(BasicEvent e) {
int i;
Object o;
boolean invoke;
sync: synchronized (this) {
invoke = !paused;
i = collQueue.size() - 1;
if (i >= 0) {
o = collQueue.get(i);
if ((o instanceof BasicEvent) && e.incorporate((BasicEvent) o)) {
collQueue.set(i, e);
break sync;
}
}
collQueue.add(e);
} // synchronized( this )
if (invoke)
EventQueue.invokeLater(this);
}
COM: <s> puts a new event in the queue </s>
|
funcom_train/8542402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findProjectIdForName(String projectName) {
Cursor projectCursor = getContext().getContentResolver().query(
AGtd.Projects.CONTENT_URI, new String[] {AGtd.Projects._ID},
AGtd.Projects.TITLE + "=?", new String[] {projectName}, null);
int result = -1;
if (projectCursor.first()) {
result = projectCursor.getInt(0);
}
AGtdContentProvider.popCursor(projectCursor);
return result;
}
COM: <s> lookup method that searches for a project name </s>
|
funcom_train/44852385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryResult getRootQuestions(String inGroupID) throws VException, SQLException {
KeyObject lKey = new KeyObjectImpl();
lKey.setValue(QuestionHome.KEY_GROUP_ID, new Long(inGroupID));
lKey.setValue(QuestionHome.KEY_ROOT_QUESTION, QuestionHome.IS_ROOT);
return select(lKey);
}
COM: <s> returns the root questions of the specified group </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.