__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/4192967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminate()
{ retransmission_to.halt();
clearing_to.halt();
end_to.halt();
if (statusIs(STATE_TRYING)) sip_provider.removeSipProviderListener(new TransactionIdentifier(SipMethods.INVITE));
else sip_provider.removeSipProviderListener(transaction_id);
changeStatus(STATE_TERMINATED);
transaction_listener=null;
}
COM: <s> method used to drop an active transaction </s>
|
funcom_train/39289062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection) {
BasicConnectionElement wire = (BasicConnectionElement)connection.getModel();
ConnectionAnchor anchor;
String terminal;
Point r = new Point(wire.getSourceTerminalPoint());
getFigure().translateToAbsolute(r);
anchor = ((BasicNodeElementFigure)getFigure())
.getReconnectionSourceConnectionAnchorAt(r);
terminal = ((BasicNodeElementFigure)getFigure())
.getConnectionAnchorName(anchor);
ConnectionAnchor result = ((BasicNodeElementFigure)getFigure())
.getConnectionAnchor(terminal);
return result;
}
COM: <s> node edit part interface method </s>
|
funcom_train/20625801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassifyCycleError (int cycleNumber, DTSConcept concept, DTSRoleType roleType) {
//Should the client side checks if roleType is null?
//How about creating CycleError and RoleCyleError which extends CycleError? --CK
this.cycleNumber = cycleNumber;
this.concept = concept;
this.roleType = roleType;
}
COM: <s> creates this cycle error entry </s>
|
funcom_train/40544552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String formatDate(String format, Date date) {
if (format == null)
format = DateTimeFormat.getLongDateFormat().getPattern();
else
format = format.replaceAll("dddd", "EEEE").replaceAll("ddd", "EEE");
if (date == null)
return format;
return DateTimeFormat.getFormat(format).format(date);
}
COM: <s> method for formating dates using date time format </s>
|
funcom_train/7511100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelInterface() {
if (jPanelInterface == null) {
jPanelInterface = new JPanel();
jPanelInterface.setLayout(new GridBagLayout());
jPanelInterface.setBorder(BorderFactory.createTitledBorder(Messages
.getString("SettingsWindow.intefaceBorder")));
jPanelInterface.setName("jPanelLaF");
jPanelInterface.add(getJPanelInterfacePlace(), AppHelper.getJBCInBorderPanel());
}
return jPanelInterface;
}
COM: <s> this method initializes j panel la f </s>
|
funcom_train/23353232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateInputParam(String searchText) throws NullParamException {
if (StringUtil.isNullOrEmpty(clean(searchText, false))) {
//TODO
throw new NullParamException("Empty search text is not permitted!");
//showMessage("query.empty", FacesMessage.SEVERITY_WARN, null);
// return "search";
}
}
COM: <s> an util method to validate if the search text input is </s>
|
funcom_train/35495872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutputDataStream getDataOutputStream() throws IOException {
if (dataOutStrm == null)
System.out.println("[RTPL2capAdapterSender]Send outputStream on:" +urlL2CAPDataDestination);
dataOutStrm = new L2CAPOutputStream(dataConnection,connectionDataMonitor,urlL2CAPDataDestination,"RTP DATA");
return dataOutStrm;
}
COM: <s> returns an output stream to send the rtp data </s>
|
funcom_train/15858452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerUndoMacro(KeyStroke keyStroke) {
final String CLEAR_COMMAND_KEY = "hanzilookup.undo";
Action undoAction = new AbstractAction() {
public void actionPerformed(ActionEvent e) {
HanziLookup.this.undoButton.doClick();
}
};
this.registerMacro(keyStroke, this.undoMacro, CLEAR_COMMAND_KEY, undoAction);
this.undoMacro = keyStroke;
}
COM: <s> register the key stroke as the macro for the undo button </s>
|
funcom_train/19067040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException, IMAPException {
checkState(SELECTED);
IMAPCommand command = new IMAPCommand(tagFactory.nextTag(), "CLOSE");
IMAPResponse[] responses = communicate(command);
// handle any responses that do not directly
// relate to the command
for (int i = 0; i < responses.length - 1; i++) {
handleResponse(responses[i]);
}
// Check last response for command success
if (!responses[responses.length - 1].isOK())
throwException(responses[responses.length - 1]);
state = AUTHENTICATED;
}
COM: <s> closes the selected mailbox </s>
|
funcom_train/46824317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawMousePiece(Graphics g) {
if (this.mousePoint != null) {
Image image = GameImages.getImage (ReversiImages.MOUSE_PIECE);
if (image != null) {
Point screen = getScreenCoords (mousePoint.x, mousePoint.y);
g.drawImage (image, screen.x, screen.y, null);
}
}
}
COM: <s> draw the mouse piece </s>
|
funcom_train/925630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAttributes(int attributeType) {
if (attributeType < 1 || attributeType > 255)
throw new IllegalArgumentException("attribute type out of bounds");
LinkedList result = new LinkedList();
for (Iterator i = attributes.iterator(); i.hasNext();) {
RadiusAttribute a = (RadiusAttribute)i.next();
if (attributeType == a.getAttributeType())
result.add(a);
}
return result;
}
COM: <s> returns all attributes of this packet of the given type </s>
|
funcom_train/49469237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VRTId getCurrentVRTMeetingId() throws Exception, RaciException{
Db db = dbRO();
try{
_logger.info("VRT : getCurrentVRTMeetingId ");
DbPerso.checkUserCanAccessModule(db, getCurrentUser());
return DbVRTMeeting.getCurrentVRTMeetingId(db);
} catch (Exception e) { store(e); throw e; } finally { db.safeClose(); }
}
COM: <s> get the currently started or paused vrt meeting or null </s>
|
funcom_train/5183412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createControlNodes3Group() {
PaletteGroup paletteContainer = new PaletteGroup(Messages.ControlNodes3Group_title);
paletteContainer.setId("createControlNodes3Group"); //$NON-NLS-1$
paletteContainer.setDescription(Messages.ControlNodes3Group_desc);
paletteContainer.add(createActivityInitialNode1CreationTool());
paletteContainer.add(createActivityFinalNode2CreationTool());
paletteContainer.add(createFlowFinalNode3CreationTool());
paletteContainer.add(createMergeDecisionNode4Group());
paletteContainer.add(createForkJoinNode5Group());
return paletteContainer;
}
COM: <s> creates control nodes palette tool group </s>
|
funcom_train/35865430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RoomEntity createRoom(String roomID, int capacity, String location, String owner) {
RoomEntity room = null;
room = (RoomEntity) em.find(RoomEntity.class, roomID);
if (room == null) {
room = new RoomEntity(roomID, capacity, location, owner);
em.persist(room);
}
em.flush();
return room;
}
COM: <s> create and persist a room </s>
|
funcom_train/2040151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSaveLastGroupIdAndScreenId() {
int groupId = 1;
int screenId = 10;
UserCache.saveLastGroupIdAndScreenId(ctx, groupId, screenId);
assertEquals(groupId, UserCache.getLastGroupId(ctx));
assertEquals(screenId, UserCache.getLastScreenId(ctx));
}
COM: <s> test basic set get on group id and screen id </s>
|
funcom_train/47833616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printUnifiers() {
Set set = this.getUnifiers().entrySet();
Iterator it = set.iterator();
while (it.hasNext()) {
Map.Entry me = (Map.Entry) it.next();
//logger.debug(me.getKey() + " : " + ((Variable) me.getValue()).toString(true));
}
}
COM: <s> prints out the unifiers of the template </s>
|
funcom_train/28500414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String readAsString( InputStream pInput ) throws IOException {
try {
InputStreamReader isr = new InputStreamReader(pInput);
BufferedReader br = new BufferedReader(isr);
StringBuilder buf = new StringBuilder();
String line;
while((line = br.readLine()) != null)
buf.append(line).append('\n');
return buf.toString();
} finally {
}
}
COM: <s> read an inputstream as string </s>
|
funcom_train/18003274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTrainingSynapses(){
// Create training input data set and connect it to the input layer
trSetIn = createInput(inputFileTraining,trFirstRow, trLastRow, firstInCol, lastInCol);
inLayer.addInputSynapse(trSetIn);
// Connect training desired data set to the teacher
trSetDes = createInput(inputFileTraining, trFirstRow, trLastRow, firstTargetCol, lastTargetCol);
theTeacher.setDesired(trSetDes);
}
COM: <s> creates all input and desired output synapses required during the </s>
|
funcom_train/14233215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void joinedGame(WC3Packet packet) {
byte[] bytes = packet.getData();
playersNoticed = new HashMap<String,Boolean>();
teamCount = NO_TEAMS_YET;
lastLeftTeam= NO_LEAVERS_YET;
inGame = true;
// Name parser
String name = "";
int x;
for (x = 12; bytes[x] != WC3Packet.NULL_BYTE; x++) {
name += Parser.byteToString(bytes[x]);
}
//System.out.println("Joined a game");
bannedList = "";
g.updateGameLabel(name);
gameTitle = name;
}
COM: <s> processes game joined packets </s>
|
funcom_train/13403715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BigDecimal number() throws ParseException {
Logger.getLogger("engine").fine(
"InfixCalculator: " + "Entered number method.");
BigDecimal number = null;
try {
number = new BigDecimal(token.stringValue());
} catch (NumberFormatException e) {
error();
}
match(Token.NUMBER);
Logger.getLogger("engine").fine(
"InfixCalculator: " + "Exited number method.");
return number;
}
COM: <s> at this point the token should definitely be a number </s>
|
funcom_train/19654831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCapabilities() {
String capabilities = "";
for (Capability cap:config.getVersion().get(this.versionPosition).getCapability()) {
try{
String[] caps = cap.getType().split(":"); //das1:sources
capabilities += " " + caps[1] + "/1.0;";
} catch (Exception e) {
//Just do not include that capability
}
}
return capabilities.substring(0, capabilities.length()-1);
}
COM: <s> returns the capabilities of the datasource </s>
|
funcom_train/28753086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCollectiontype(String newVal) {
if ((newVal != null && this.collectiontype != null && (newVal.compareTo(this.collectiontype) == 0)) ||
(newVal == null && this.collectiontype == null && collectiontype_is_initialized)) {
return;
}
this.collectiontype = newVal;
collectiontype_is_modified = true;
collectiontype_is_initialized = true;
}
COM: <s> setter method for collectiontype </s>
|
funcom_train/44723107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getTalents() {
ArrayList data;
Talent tal;
int index;
data = new ArrayList();
for (index = 0; index < talents.size(); index++) {
tal = (Talent)talents.get(index);
data.add(tal.getName());
data.add(new Integer(tal.getWhole()));
data.add(new Boolean(tal.getHalf()));
data.add(new Boolean(tal.isPrimary()));
data.add(tal.getAttrib());
}
return data;
}
COM: <s> returns the talents for the character </s>
|
funcom_train/32979182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseEntered(MouseEvent e)
{ /* mouseEntered */
if(dwSP!=null)
dwSP.mouseEntered(e);
else if(dwH!=null)
dwH.mouseEntered(e);
else if(dwRH!=null)
dwRH.mouseEntered(e);
else if(dwCG!=null)
dwCG.mouseEntered(e);
} /* mouseEntered */
COM: <s> mouse entered handle mouse enter events </s>
|
funcom_train/15627724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setValue() {
final int value = dialogAttributeBitmask.getValue();
final int number = dialogAttributeBitmask.getBitmask().getNumber();
for (int i = 0; i < number; i++) {
if (checkbox[i] != null) {
checkbox[i].setSelected(isActive(i + 1, value));
}
}
}
COM: <s> sets the currently selected values to the default values </s>
|
funcom_train/29864557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void persistenceUpdate() {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
Log log = Log.getInstance();
try {
writeToFile(list, fileName);
} catch (Exception e) {
log.writeToLog("ServiceList: Unable to write XML file from servicelist. Filename=" + fileName, Log.WARNING);
e.printStackTrace();
}
}
COM: <s> persistence update for the service xml file </s>
|
funcom_train/12192852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getType(String qName) {
int max = length * SLOTS_PER_ATTRIBUTE;
for (int i = 0; i < max; i += SLOTS_PER_ATTRIBUTE) {
if (data[i + OFFSET_QNAME].equals(qName)) {
return (String) data[i + OFFSET_TYPE];
}
}
return null;
}
COM: <s> look up an attributes type by qualified prefixed name </s>
|
funcom_train/50229015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadProperties(Properties newProps) {
Iterator iter = props.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry)iter.next();
props.setProperty((String)entry.getKey(), (String)entry.getValue());
}
}
COM: <s> load and absorb a set of properties </s>
|
funcom_train/440429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsPoint(Point point) {
Point absLoc = getAbsoluteLocation();
return (point.x >= absLoc.x && point.y >= absLoc.y &&
point.x < (absLoc.x + width) &&
point.y < (absLoc.y + height));
}
COM: <s> tells if the point is inside of the sprite </s>
|
funcom_train/3473138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void componentHidden(ComponentEvent event) {
Component component = (Component) event.getSource();
ComponentPropertiesRecordable properties = componentToProperties
.get(component);
if (properties.getApplyIsVisible() && properties.getIsVisible()) {
Thread t = new ComponentStateChanger(component,
ComponentStateChanger.Type.VISIBLE, true);
t.start();
}
}
COM: <s> called when a component is hidden </s>
|
funcom_train/5384312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getIconFromProgram(Program program) {
Image image = (Image) iconCache.get(program);
if (image == null) {
ImageData imageData = program.getImageData();
if (imageData != null) {
image = new Image(null, imageData, imageData.getTransparencyMask());
iconCache.put(program, image);
} else {
image = stockImages[iconFile];
}
}
return image;
}
COM: <s> gets an image for a file associated with a given program </s>
|
funcom_train/7668257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DoubleBuffer put(DoubleBuffer src) {
if (src == this) {
throw new IllegalArgumentException();
}
if (src.remaining() > remaining()) {
throw new BufferOverflowException();
}
double[] doubles = new double[src.remaining()];
src.get(doubles);
put(doubles);
return this;
}
COM: <s> writes all the remaining doubles of the </s>
|
funcom_train/21493258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefinition(ListItem item){
if (item.getNode() == null)return null;
Node n = XMLHandler.getChildNodeByName(item.getNode(), "xsd:annotation");
if (n == null)return null;
n = XMLHandler.getChildNodeByName(n,"xsd:documentation");
if (n == null)return null;
n = XMLHandler.getChildNodeByName(n,"ccts:Definition");
if (n == null) return null;
try {
return n.getTextContent();
}
catch (DOMException e)
{
return null;
}
}
COM: <s> gets the definition value of the element item </s>
|
funcom_train/35108838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface Exporter extends Event.Exporter {
/**
* Adds the exception that was caught. This is called by
* {@code ExceptionEvent#export(Exporter)}.
*
* @param exception the exception
*/
public void addException(Value exception);
/**
* Adds the catcher of the exception. This This is called by
* {@code ExceptionEvent#export(Exporter)}.
*
* @param catcher the catcher
*/
public void addCatcher(ContourID catcher);
/**
* Adds the variable identifier holding the exception that was caught. This
* is called by {@code ExceptionEvent#export(Exporter)}.
*
* @param v the variable identifier
*/
public void addVariable(VariableID v);
}
COM: <s> exporter reverse builder for an exception event </s>
|
funcom_train/48653956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(Node node) {
// concatenate node into min list
if (min != null) {
node.right = min;
node.left = min.left;
min.left = node;
node.left.right = node;
if (node.key < min.key) {
min = node;
}
} else {
min = node;
}
n++;
}
COM: <s> inserts a new data element into the heap </s>
|
funcom_train/42045392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUpdatePKSQL(OptimisticLocking optimisticLocking, List<String> changedPropertyList, List<String> nullColumnList) {
StringBuilder sb = new StringBuilder();
for (String propertyName : changedPropertyList) {
sb.append(propertyName);
sb.append(";");
}
for (String columnName : nullColumnList) {
sb.append(columnName);
sb.append(";");
}
sb.append(optimisticLocking);
return updatePkCache.get(sb.toString());
}
COM: <s> return the update sql statement for the locking scheme and changed properties </s>
|
funcom_train/8506431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadLogin() {
// Assemble login panel.
AbsolutePanel loginPanel = new AbsolutePanel();
Label loginLabel = new Label(GameConfig.getInstance().getConstants().login());
Anchor signInLink = new Anchor(GameConfig.getInstance().getConstants().signin());
signInLink.setHref(loginInfo.getLoginUrl());
loginPanel.add(loginLabel);
loginPanel.add(signInLink);
RootPanel.get("signInContainer").add(loginPanel);
}
COM: <s> loads the login screen </s>
|
funcom_train/29996555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("Synchronizer".equals(portName)) {
setSynchronizerEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/47109562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RosterStatisticQueryParam initQueryParam() {
RosterStatisticQueryParam queryParam = new RosterStatisticQueryParam();
Calendar cal = Calendar.getInstance();
queryParam.month = cal.get(Calendar.MONTH) + 1;
queryParam.year = cal.get(Calendar.YEAR);
queryParam.systemUser = FacesUtils.getPrincipal().getLogin().getSystemUser();
return queryParam;
}
COM: <s> returns the initialized search parameters </s>
|
funcom_train/8477400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resumeDownload(){
log(0, "Calling SP.resumeDownload()..");
synchronized(connectionLock){
try{
streamingPlayer.closeConnection();
stopDownload = false;
long oldBufferStartsAt = bufferStartsAt;
bufferStartsAt = bufferEndsAt; // re-setting bufferStartsAt because this is sent as the range-header.
streamingPlayer.initConnection();
bufferStartsAt = oldBufferStartsAt;
dataSource.start();
reconnectInProgress = false;
log(0, "SP.resumeConnection() - download resumed.");
} catch(Throwable t){
reconnectInProgress = false;
}
}
}
COM: <s> used to reconnect and resume download in case download encounters an error </s>
|
funcom_train/15405926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadBatchInBackground() {
// single threaded processing...
synchronized (backgroundLoadMonitor) {
if (currentlyBackgroundLoading > 0){
// skip as already background loading
if (logger.isLoggable(Level.FINE)){
logger.log(Level.FINE, "... skip background sequence load (another load in progress)");
}
return;
}
currentlyBackgroundLoading = batchSize;
backgroundExecutor.execute(new Runnable() {
public void run() {
loadMoreIds(batchSize, null);
synchronized (backgroundLoadMonitor) {
currentlyBackgroundLoading = 0;
}
}
});
}
}
COM: <s> load another batch of ids using a background thread </s>
|
funcom_train/2380793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuManager createToolsMenu() {
MenuManager menu = new MenuManager("&Tools", "tools");
menu.add(_actionPersonalProfiles);
menu.add(_actionManageConduits);
menu.add(_actionManageProviders);
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
return menu;
}
COM: <s> create the tools menu </s>
|
funcom_train/28662096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillIn() {
if (data.getN() != null) {
plist.setText(data.getP().toString());
qlist.setText(data.getQ().toString());
elist.setText(data.getE().toString());
}
}
COM: <s> fills in the already entered data from the last wizard run </s>
|
funcom_train/39025350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getSize() {
int x = 0, y = 0;
Iterator<Point> iter = cells.keySet().iterator();
while (iter.hasNext()) {
Cell cell = cells.get(iter.next());
x = Math.max(x, cell.getX());
y = Math.max(y, cell.getY());
}
return new Dimension(++x, ++y);
}
COM: <s> gets the current map size </s>
|
funcom_train/44701876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countAnnotatedSinglets(AssemblyId assemblyId) throws SQLException {
Statement statement = connection.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet result;
int count = 0;
String query = "SELECT COUNT(*) FROM " + SingletContainer.SINGLETS
+ "_" + assemblyId + " WHERE " + ANNOTATED + "=true";
try {
result = statement.executeQuery(query);
if (result.first()) {
count = result.getInt("count");
}
} catch (SQLException e) {
throw e;
} finally {
statement.close();
}
return count;
} //countAnnotatedSinglets()
COM: <s> counts the number of singlets annotated </s>
|
funcom_train/28765748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHlink(String newVal) {
if ((newVal != null && this.hlink != null && (newVal.compareTo(this.hlink) == 0)) ||
(newVal == null && this.hlink == null && hlink_is_initialized)) {
return;
}
this.hlink = newVal;
hlink_is_modified = true;
hlink_is_initialized = true;
}
COM: <s> setter method for hlink </s>
|
funcom_train/1461432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StatusReport report() {
Exception e = currentException();
if (e != null) {
lastReport = new StatusReport(e, currentState(), messages);
} else {
lastReport = new StatusReport(completed(), currentState(), messages);
}
handler.report(resourceShortname, lastReport);
return lastReport;
}
COM: <s> reports back the state of the task to the reporting handler configured </s>
|
funcom_train/1905093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadProperties() {
boolean commandLineMode = true;
String ctm = null;
boolean test = true;
Harvester.loadProperties(commandLineMode, test);
try {
ctm = PropertyService.getProperty("harvester.connectToMetacat");
} catch (PropertyNotFoundException pnfe) {
fail("Could not get connectToMetacat property: "+ pnfe.getMessage());
}
assertTrue(ctm.equals("true") || ctm.equals("false"));
}
COM: <s> tests loading of harvester properties from a configuration file </s>
|
funcom_train/38158579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getPartInstanceVector() {
if (this.partInstanceVector.size() == 0) {
errorLogger.debug("setting partinstancevector for " + this.assignmentID);
this.setPartInstanceVector(
AssignmentPartInstanceController.getAll(this.assignmentID));
}
return this.partInstanceVector;
}
COM: <s> return the part instance vector for this assignment </s>
|
funcom_train/14384298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applySettings() {
metricName = edMetricNodeAlias.getText();
for (int i = 0; i < GlobalData.metricVector.size(); i++) {
Metric metric = GlobalData.metricVector.get(i);
if (metricName.matches(metric.metricName)) {
JOptionPane.showMessageDialog(this,
"Metric name must be unique. Enter another name.",
"Metric Options",
JOptionPane.INFORMATION_MESSAGE);
return;
}
}
result = true;
setVisible(false);
}
COM: <s> close dialog and apply new settings </s>
|
funcom_train/34709288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double computeMSE() {
Iterator<Result> iterator = iterator();
Result segment;
mse = 0.0;
if (iterator.hasNext()) {
segment = (Result) iterator.next();
int lastLine = segment.getPosition().getLine();
while (iterator.hasNext()) {
segment = (Result) iterator.next();
double delta = segment.getPosition().getLine() - lastLine - ald;
lastLine = segment.getPosition().getLine();
mse += (delta * delta);
}
mse /= size();
}
return mse;
}
COM: <s> computes mse mean squared error </s>
|
funcom_train/35327739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractStringBuilder append(char str[], int offset, int len) {
if (len > 0) // let arraycopy report AIOOBE for len < 0
ensureCapacityInternal(count + len);
System.arraycopy(str, offset, value, count, len);
count += len;
return this;
}
COM: <s> appends the string representation of a subarray of the </s>
|
funcom_train/18599271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int parseVersionNumber(String number) throws Exception {
// Remove extra "-SNAPSHOT" info which may be in version number
int dashIdx = number.indexOf("-");
if (dashIdx != -1) {
number = number.substring(0, number.indexOf("-"));
}
return Integer.valueOf(number.replaceAll("\\.", ""));
}
COM: <s> parses a version number removing extra element and returning an integer </s>
|
funcom_train/5166791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTotalNumberOfCoins(IChromosome a_potentialsolution) {
return
getNumberOfCoinsAtGene(a_potentialsolution, SupergeneSample.QUARTERS)
+ getNumberOfCoinsAtGene(a_potentialsolution, SupergeneSample.DIMES)
+ getNumberOfCoinsAtGene(a_potentialsolution, SupergeneSample.NICKELS)
+ getNumberOfCoinsAtGene(a_potentialsolution, SupergeneSample.PENNIES);
}
COM: <s> returns the total number of coins represented by all of the genes in </s>
|
funcom_train/31022614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IStatus formNameChanged(String string) {
StatusInfo status = new StatusInfo();
try {
if ( !actionIsNext && EasyStrutsView.getActiveEasyStrutsView().getSelectedProjectModel().getModule(moduleName.getText()).findFormBeanConfig(string) == null ) {
status.setWarning(EasyStrutsMessages.getString("action.formnotfound"));
}
} catch ( NoStrutsSupportException nssE ) {;}
return status;
}
COM: <s> method form name changed </s>
|
funcom_train/22402250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void callback(GraphElementFacade e) {
System.out.println("Inside GraphControl.Cluster");
//get the layout interaction and carry out the interaction
LayoutInteraction li = getRootCluster().getLayoutEngine().getLayoutInteraction();
if(li != null) { //this is null if no interaction is specified for this layout
li.interact(LayoutInteraction.CLUSTER, e, getGraphCanvas(), getRootCluster());
}
}
COM: <s> called when the cluster is picked with the left or middle mouse button </s>
|
funcom_train/11320699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setCookie(String value, String name) {
Context context = getContext();
if (value == null) {
ClickUtils.setCookie(context.getRequest(), context.getResponse(),
name, value, 0, "/");
} else {
ClickUtils.setCookie(context.getRequest(), context.getResponse(),
name, value, -1, "/");
}
}
COM: <s> sets a cookie with the specified name and value to the </s>
|
funcom_train/45133664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSibling(XML sibling) throws XMLInvalidTagException, NullPointerException {
if (value != null){
throw new XMLInvalidTagException("This is a leaf, it cannot have siblings");
}
if (sibling == null){
throw new NullPointerException("You cannot add a null sibling");
}
siblings.add(sibling);
}
COM: <s> adds a new tag as the last child of the root one </s>
|
funcom_train/9236139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pageDown() {
//setScrollBarPosition(scrollBar.getValue() + canvas.getLastVisibleLine() - canvas.getFirstVisibleLine() + 1);
//use this method for now, its consistent with the block unit for the scrollbar
setScrollBarPosition(scrollBar.getValue() + 10);
}
COM: <s> scrolls one page up in the textpane </s>
|
funcom_train/18104507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkIfPermitted(int action) {
if (actions == null) {
/* totally trusted, all actions are permitted */
return;
}
for (int i = 0; i < actions.length; i++) {
if (actions[i] == action) {
return;
}
}
throw new SecurityException("Application not authorized " +
"to access the restricted API");
}
COM: <s> check to see the domain permitted to perform a specific action </s>
|
funcom_train/51011637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doSetField(Field field, Object valueToSet) {
try {
boolean originalAccessibility = field.isAccessible();
field.setAccessible(true);
field.set(target, valueToSet);
field.setAccessible(originalAccessibility);
} catch (IllegalAccessException e) {
e.printStackTrace();
throw new ProgrammingError(
"the member '"
+ field.getName()
+ "' in the class '"
+ target.getClass().getName()
+ "' associated to the option "
+ option
+ " is not accessible");
}
}
COM: <s> sets the field regardless of its accessibility state </s>
|
funcom_train/37739218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBytes(int n, byte[] byteArray) throws SQLException {
if (delegee != null) {
if (passThrough
|| byteArray == null || byteArray.length == 0) {
delegee.setBytes (n, byteArray);
return;
} else if (deferDelegee) {
Integer index = new Integer(n);
updateBlobsMap.put(index, byteArray);
delegee.setBlob(n, oracle.sql.BLOB.empty_lob());
return;
}
}
throw new UnsupportedOperationException ();
}
COM: <s> store the object </s>
|
funcom_train/2811966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addAllToHistory (Collection pHistoryList) {
if (pHistoryList == null) {
throw new RuntimeException("Attempted to add null container to WFExecutionObject#History!");
}
int lInserted=0;
for(Iterator it = pHistoryList.iterator(); it.hasNext(); ) {
try {
WFEventAudit lHistory = (WFEventAudit)it.next();
addHistory( lHistory );
++lInserted;
} catch(Throwable t) {
continue;
}
}
return lInserted;
}
COM: <s> adds all elements in p history list to association history </s>
|
funcom_train/39276191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void releaseParsing() throws IOException {
// releases analyzers
if (analyzers != null && analyzers.length > 0) {
for (int i = 0; i < analyzers.length; i++) {
analyzers[i].releaseAnalyze(this);
}
}
// Sets parsing info before close the reader because closing the reader
// might throw an exception.
parsing = false;
fireEndParsing();
}
COM: <s> makes the releases after parsing </s>
|
funcom_train/37557582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillOval (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/* Assumes that user sets the background color. */
int nullPen = OS.GetStockObject(OS.NULL_PEN);
int oldPen = OS.SelectObject(handle, nullPen);
OS.Ellipse(handle, x,y,x+width+1,y+height+1);
OS.SelectObject(handle,oldPen);
}
COM: <s> fills the interior of an oval within the specified </s>
|
funcom_train/44011531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCouponList() {
System.out.println("getCouponList");
TransactionBO instance = new TransactionBO();
ArrayList<CouponBO> expResult = null;
ArrayList<CouponBO> result = instance.getCouponList();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get coupon list method of class edu </s>
|
funcom_train/3945964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validatePrerequisiteStringType_MaxLength(String prerequisiteStringType, DiagnosticChain diagnostics, Map context) {
int length = prerequisiteStringType.length();
boolean result = length <= 200;
if (!result && diagnostics != null)
reportMaxLengthViolation(AdlcpRootv1p2Package.eINSTANCE.getPrerequisiteStringType(), prerequisiteStringType, length, 200, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em prerequisite string type em </s>
|
funcom_train/2295328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsJspContentAccessValueWrapper getResolveMacros() {
if (m_macroResolver == null) {
CmsMacroResolver macroResolver = CmsMacroResolver.newInstance();
macroResolver.setCmsObject(m_cms);
macroResolver.setKeepEmptyMacros(true);
return new CmsJspContentAccessValueWrapper(this, macroResolver);
}
// macro resolving is already turned on
return this;
}
COM: <s> turn on macro resolving for the wrapped value </s>
|
funcom_train/17203178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Instruction inst) {
Iterator<GCIRMapElement> iter = list.iterator();
while (iter.hasNext()) {
GCIRMapElement ptr = iter.next();
if (ptr.getInstruction() == inst) {
iter.remove();
return;
}
}
throw new OptimizingCompilerException("GCIRMap.delete(" +
inst +
") did not delete instruction from GC Map ");
}
COM: <s> this method removes an entry in the gcirmap that is specified </s>
|
funcom_train/45743517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(
OntoUML.diagram.part.OntoUMLVisualIDRegistry
.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/40684256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testASimplePieChart() {
loadApi(new Runnable() {
public void run() {
DataTable data = createDailyActivities();
// Create a minimal pie chart.
Options options = Options.create();
options.setWidth(400);
options.setHeight(240);
RootPanel.get().add(new PieChart(data, options));
}
});
}
COM: <s> this test case will try creating a simple pie chart </s>
|
funcom_train/45457908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Insets getBorderInsets(Component c) {
// Check textArea's orientation, not c's, as c is the JScrollPane.
// The application might allow the user to toggle the text area's
// orientation separately from the UI's.
if (textArea.getComponentOrientation().isLeftToRight()) {
insets.left = cellWidth;
insets.right = 0;
}
else {
insets.left = 0;
insets.right = cellWidth;
}
return insets;
}
COM: <s> returns the insets of this border </s>
|
funcom_train/37483161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(String itemName) throws Exception {
for (int i = 0; i < list.size(); i++) {
MaintenanceItem findItem = (MaintenanceItem) list.get(i);
if (findItem.getItemName().equals(itemName)) {
return i;
}
}
Exception e = new Exception("The specified item " + itemName
+ " could not be found.");
throw e;
}
COM: <s> returns the index of the item with the specified name from the </s>
|
funcom_train/39367140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getFloatArray(String key, float values[]) {
PropertyDescription property = getTraceProperty(key);
setBufferPosition(property);
int count = property.getCount();
for(int i = 0; i < count; i++) {
values[i] = _buffer.getFloat();
}
}
COM: <s> gets a trace property value as a float array </s>
|
funcom_train/3849377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object value) {
if (value instanceof Boolean){
_value = (Boolean)value;
return;
}
else if(value instanceof String){
_value = Boolean.valueOf((String)value);
return;
}
else if(value instanceof StringBuffer){
_value = Boolean.valueOf(((StringBuffer)value).toString());
return;
}
else{
String s = value.getClass().toString();
throw new PreferenceValueTypeException("Preference Type is Boolean attempted to pass in "+ s);
}
}
COM: <s> sets the value of this boolean type </s>
|
funcom_train/18836159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeConnection() {
BTService.getInstance().log("closing connection with " + this.endpt.getName());
this.done = true;
BTService.getInstance().fireEvent(BTListener.EVENT_LEAVE, this.endpt, null);
// send TERMINATE signal to other connected BlueChat peers
//endpt.putString(BTService.SIGNAL_TERMINATE, "end");
this.con = null;
}
COM: <s> closes all the remote connection to the bluetooth device </s>
|
funcom_train/44556311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convertToGray16() {
if (type==ImagePlus.GRAY16)
return;
if (!(type==ImagePlus.GRAY8||type==ImagePlus.GRAY32||type==ImagePlus.COLOR_RGB))
throw new IllegalArgumentException("Unsupported conversion");
ImageProcessor ip = imp.getProcessor();
imp.trimProcessor();
imp.setProcessor(null, ip.convertToShort(ImageConverter.doScaling));
imp.setCalibration(imp.getCalibration()); //update calibration
}
COM: <s> converts this image plus to 16 bit grayscale </s>
|
funcom_train/41385596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotonGuardar() {
if (botonGuardar == null) {
botonGuardar = new JButton();
botonGuardar.setBounds(new Rectangle(125, 120, 80, 30));
botonGuardar.setFont(new Font("Verdana", Font.PLAIN, 10));
botonGuardar.setText("Guardar");
botonGuardar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
listener.actionPerfomred(e);
}
});
}
return botonGuardar;
}
COM: <s> this method initializes boton guardar </s>
|
funcom_train/12180508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refresh() {
if (categoryComposite != null && !categoryComposite.isDisposed()) {
categoryComposite.setSize(this.computeSize(SWT.DEFAULT,
SWT.DEFAULT));
categoryComposite.layout();
categoryComposite.pack();
displayArea.setMinSize(
categoryComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
}
COM: <s> performs a refresh of the scrolled area so that the displays size </s>
|
funcom_train/4809441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean disband(){
if(isEmpty()){ return false; }
for(int x = 0; x < unitList.size(); x++){
unitList.get(x).removeFromArmy();
}
setUnitList(new ArrayList<Unit>(10));
return true;
}
COM: <s> removes all of the units from the army and resets the unit list </s>
|
funcom_train/4377680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String join(String separator) throws RJSONException {
int len = length();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < len; i += 1) {
if (i > 0) {
sb.append(separator);
}
sb.append(RJSONObject.valueToString(this.myArrayList.get(i)));
}
return sb.toString();
}
COM: <s> make a string from the contents of this jsonarray </s>
|
funcom_train/32160047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(Message message, int viewId, long timeoutMillis) throws IOException, SocketTimeoutException {
boolean commitVote = sendPrepare(message, viewId, timeoutMillis);
if (commitVote) {
// sendVote(GLOBAL_COMMIT, message.getDestinationAddresses(), timeoutMillis);
} else {
// sendVote();
}
}
COM: <s> send message to all member of the group </s>
|
funcom_train/27823277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(RemovePropertyInstance event) throws KAONException {
PropertyInstance propertyInstance=event.getPropertyInstance();
loadEntity(propertyInstance.getProperty());
loadEntity(propertyInstance.getSourceInstance());
if (propertyInstance.getTargetValue() instanceof Instance)
loadEntity((Instance)propertyInstance.getTargetValue());
}
COM: <s> visits an event for removing a property instance </s>
|
funcom_train/7526700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDisconnectConnectOne_Default() throws Exception {
channel=new JChannel();
channel.connect("testgroup1");
channel.disconnect();
channel.connect("testgroup2");
View view=channel.getView();
assertEquals(1, view.size());
assertTrue(view.containsMember(channel.getLocalAddress()));
}
COM: <s> tests connect disconnect connect sequence for a group with one member </s>
|
funcom_train/13814839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getImgHeight() {
int h = imgHeight;
if ( resType == RES_CUSTOM ) {
String strHeight = customHeightFld.getText();
try {
h = Integer.parseInt( strHeight );
} catch (NumberFormatException ex) {
ex.printStackTrace();
}
}
return h;
}
COM: <s> get the heigth for the exported photo s selected by user </s>
|
funcom_train/25422964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSaveSearchStyle() {
SearchConfig cfg = extractRequestContext().getCatalogConfiguration().getSearchConfig();
int nMax = cfg.getMaxSavedSearches();
if (this.savedSearches.size() >= nMax) {
return "display: none;";
} else {
return "";
}
}
COM: <s> gets the style attribute for the save search control </s>
|
funcom_train/22108741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PageList getAllPlatformTypes(AuthzSubject subject, PageControl pc) {
Collection platTypes = getPlatformTypeDAO().findAllOrderByName();
// valuePager converts local/remote interfaces to value objects
// as it pages through them.
return valuePager.seek(platTypes, pc);
}
COM: <s> find all platform types </s>
|
funcom_train/45243401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonArquivoMisturado() {
if (jButtonArquivoMisturado == null) {
jButtonArquivoMisturado = new JButton();
jButtonArquivoMisturado.setLocation(new Point(560, 55));
jButtonArquivoMisturado.setBackground(new Color(173, 200, 226));
jButtonArquivoMisturado.setIcon(new ImageIcon(getClass().getResource("/br/uesc/computacao/estagio/apresentacao/figuras/folder.png")));
jButtonArquivoMisturado.setSize(new Dimension(31, 28));
jButtonArquivoMisturado.setCursor(new Cursor(Cursor.HAND_CURSOR));
}
return jButtonArquivoMisturado;
}
COM: <s> this method initializes j button arquivo misturado </s>
|
funcom_train/29618333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJInstituteScrollPane() {
if (jInstituteScrollPane == null) {
jInstituteScrollPane = new JScrollPane();
jInstituteScrollPane.setBounds(176, 120, 349, 45);
jInstituteScrollPane.setViewportView(getJInstituteField());
jInstituteScrollPane.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jInstituteScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
}
return jInstituteScrollPane;
}
COM: <s> this method initializes j institute scroll pane </s>
|
funcom_train/33069923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getAttributeValueOffset(String source, FuzzyXMLAttribute attr){
int offset = source.indexOf('=',attr.getOffset());
if(offset == -1){
return -1;
}
char c = ' ';
while(c==' ' || c=='\t' || c=='\r' || c=='\n' || c=='"' || c=='\''){
offset++;
if(source.length() == offset+1){
break;
}
c = source.charAt(offset);
}
return offset;
}
COM: <s> returns an attribute value offset </s>
|
funcom_train/3819325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(String key) {
String out = null;
try {
out = resourceBundle != null ? resourceBundle.getString(key)
: defaultResourceBundle.getString(key);
} catch (Throwable th) {
try {
out = defaultResourceBundle.getString(key);
} catch (Throwable th2) {
logger.log(Level.WARNING, "Invalid Key: " + key, th2);
}
}
return out;
}
COM: <s> call to resource bundle get string key method wrapping exceptions </s>
|
funcom_train/25314253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortTuplesWithin(int[][] ts) {
for (int i = 0; i < ts.length; i++) {
boolean change = false;
for (int j = ts.length - 1; j > i; j--)
if (!smallerEqualTuple(ts[j - 1], ts[j])) {
change = true;
int[] tmp = ts[j - 1];
ts[j - 1] = ts[j];
ts[j] = tmp;
}
if (!change)
break;
}
}
COM: <s> it sorts tuples </s>
|
funcom_train/25186923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetReader() throws Exception {
System.out.println("getReader");
converter converter = new converter();
URL url = Utilities.asURL("./src/test/java/sample1.json");
assertNotNull(converter.getReader(url));
assertNull(converter.getReader(null));
}
COM: <s> test of get reader method of class converter </s>
|
funcom_train/42637403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix product(double factor){
if(factor==1.)return this;
for (int i = 0; i < getRowCount(); i++){
for (int j = 0; j < getColumnCount(); j++){
Number element = get(i,j), e = element.mult(factor);
if(e!=element)set(i,j, e);
}
}
matrixChanged();
return this;
}
COM: <s> for performance does not call process element and sets resulting elements to matrix </s>
|
funcom_train/2027298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PropertyDefinition getPropertyDefForName(String propertyName) {
PropertyDefinition[] allPropertyDefs = getPropertyDefinitions();
for (int i = 0; i < allPropertyDefs.length; ++i) {
PropertyDefinition def = allPropertyDefs[i];
if (def.getName().equals(propertyName)) {
return def;
}
}
return null;
}
COM: <s> finds the property definition with the specified name along this node </s>
|
funcom_train/14599829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readable() {
StringBuffer buf = new StringBuffer(128);
buf.append(getClass().getName()).append(":\n");
for (int i = 0; i < length(); i++) {
buf.append('\t').append(atIndex(i)).append('\n');
}
return buf.toString();
}
COM: <s> this is so curtis can read the output when debugging </s>
|
funcom_train/1064072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMultiplicityAsStringWithoutSquareBrackets() {
StringBuffer buffer = new StringBuffer();
// special case for [1] and [*]
int lower = uml2Property.getLower();
int upper = uml2Property.getUpper();
if(lower == upper) {
buffer.append(lower);
} else if ((lower == 0) && (upper == -1)) {
buffer.append("*");
} else if (upper == -1) {
buffer.append(lower);
buffer.append("..*");
} else {
buffer.append(lower);
buffer.append("..");
buffer.append(upper);
}
return buffer.toString();
}
COM: <s> returns the string corresponding to the multiplicity without square brackets </s>
|
funcom_train/45558387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addParameterTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_OwlsParameter_parameterType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_OwlsParameter_parameterType_feature", "_UI_OwlsParameter_type"),
OwlsPackage.Literals.OWLS_PARAMETER__PARAMETER_TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the parameter type feature </s>
|
funcom_train/50242896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSeatPreference() {
String retVal = this.strSeatPreference;
if ( SeatPreference.isNameDeprecated(retVal) ) {
String old = retVal;
retVal = SeatPreference.convertDeprecatedName(retVal);
if ( theLog.isDebugEnabled() ) {
String msg = "Converted SeatPreference from '" + old
+ "' to '" + retVal + "'";
theLog.debug(msg);
}
}
return retVal;
}
COM: <s> return the seating preference of a participant </s>
|
funcom_train/44707756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startup() {
Integer delay = (Integer) m_conf.getParameter("delay");
Integer frequency = (Integer) m_conf.getParameter("frequency");
Scheduler.s_timerDelay = delay.longValue() * (long) 1000;
Scheduler.s_timerFrequency = frequency.longValue() * (long) 1000;
Scheduler.startTimer();
}
COM: <s> called on startup </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.