__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/20251109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getTokenTypeCollumn(int tokenType) {
int i = 0;
for (int t : tokenTypes) {
if (t == tokenType) {
return i;
}
i++;
}
throw new Error("Token type:" + tokenType + "/" + lexico.getTokenID(tokenType) + " does not exist in the transition table.");
}
COM: <s> returns the collumn of the token type in the transition table </s>
|
funcom_train/44080021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dragDropEnd(DragSourceDropEvent dsde) {
DragSourceContext dsc = dsde.getDragSourceContext();
JDNDAdapter c = (JDNDAdapter) dsc.getComponent();
if (dsde.getDropSuccess()) {
c.getTransferHandler().exportDone(
(JComponent) c,
dsc.getTransferable(),
dsde.getDropAction());
} else {
c.getTransferHandler().exportDone((JComponent) c, null, NONE);
}
((JComponent) c).setAutoscrolls(scrolls);
}
COM: <s> as the operation completes </s>
|
funcom_train/7926928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(TaskStats stat2) {
numRuns += stat2.getNumRuns();
elapsed += stat2.getElapsed();
maxTotMem += stat2.getMaxTotMem();
maxUsedMem += stat2.getMaxUsedMem();
count += stat2.getCount();
if (round != stat2.round) {
round = -1; // no meaning if agregating tasks of different ruond.
}
}
COM: <s> add data from another stat for aggregation </s>
|
funcom_train/26453208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRows(ArrayList alertCollections) {
ArrayList alerts = new ArrayList();
for (int i=0; i<alertCollections.size(); i++) {
AlertCollection a = (AlertCollection)alertCollections.get(i);
alerts.add(a.toSummary());
}
tableModel.addRows(alerts);
}
COM: <s> adds rows to the alert collection table </s>
|
funcom_train/14337280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List processRequest(final Request req) {
if (req != null) {
if (FileUpload.isMultipartContent(req)) {
try {
DiskFileUpload dfu = new DiskFileUpload();
return dfu.parseRequest(req);
} catch (FileUploadException fue) {
}
}
return null;
}
throw new IllegalArgumentException(
"UploadService.processRequest: null Request argument");
}
COM: <s> process the request and retrieves the parameters and file contained in it </s>
|
funcom_train/12212271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IconBean createWorkspaceBean(File f) throws IOException {
IconBean bean = new IconBean();
bean.setElementName(f.getName());
bean.setDescription(f.getCanonicalPath());
bean.setElementType(IconConstants.PROJECT_OPEN);
bean.setOpenIcon(IconWorker.getInstance().getImageIcon(
IconConstants.PROJECT_OPEN));
bean.setClosedIcon(IconWorker.getInstance().getImageIcon(
IconConstants.PROJECT_CLOSED));
return bean;
}
COM: <s> load the main workspace folder </s>
|
funcom_train/50393160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fail(String errorMessage){
String msg=errorMessage!=null?"Failed: "+errorMessage:"Failed.";
ActionResult res=new ActionResult(ActionResult.NOT_SUCCESSFUL,msg);
if(executionContext!=null && executionContext.getExitCode()!=null){
res.setExitCode(executionContext.getExitCode());
}
setResult(res);
addLogTrace("Result: Failed.");
setStatus(ActionStatus.DONE);
addLogTrace("Status set to DONE.");
}
COM: <s> helper method that sets the action to failed </s>
|
funcom_train/943456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close () {
if (this.isClosed()) return; // already closed
try {
this.saveWorld(false);
} catch (Exception ex) {
String message = "Failure during save world " + this +
"\n" + ex.getMessage();
InstanceWorldUtilities.showErrorDialog(message);
}
/*******************
this.worldQuadConnection.removeModel(this.baseModel);
InstanceWorld.openWorlds.remove(this);
// if any other tabs point into the same world, delete them too:
GenericTabbedPane.removeTabsInWorld(this);
**********************/
this.isClosed = true;
}
COM: <s> save this to the source and remove it from the list of open </s>
|
funcom_train/1441374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Status destroyFavorite(long id) throws ApiException {
requireCredentials();
String url = String.format("http://twitter.com/favorites/destroy/%d.json",
id);
PostMethod method = new PostMethod(url);
String response = execute(method);
return Status.newFromJsonString(response);
}
COM: <s> un favorites the status specified in the id parameter as the authenticating </s>
|
funcom_train/33400961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(Message appMsg) {
byte type = appMsg.getType();
switch (type) {
case Message.UNICAST_APPLICATION_MSG:
sendUNICAST_MSG((UniAppMessage) appMsg);
break;
case Message.UNICAST_APPLICATION_MESSAGE_UAIH:
sendUNICAST_MSG((UniAppMessageUAIH) appMsg);
break;
case Message.MULTICAST_APPLICATION_MSG:
sendMULTICAST_APPLICATION_MSG((MultiAppMessage) appMsg);
break;
case Message.MULTICAST_APPLICATION_MESSAGE_UAIH:
sendMULTICAST_APPLICATION_MSG((MultiAppMessageUAIH) appMsg);
break;
default:
break;
}
}
COM: <s> method for sending messages </s>
|
funcom_train/25509625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exit() {
if (closeProject()) {
// if the user has closed any open project, go ahead and exit
if (logger != null) { // flush any log handlers
for (Handler h : logger.getHandlers()) {
h.flush();
h.close();
}
}
System.exit(0);
}
}
COM: <s> exit the program after giving the user a chance to save changes or </s>
|
funcom_train/121492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LogoList lprops() {
LogoList listTemp = new LogoList();
LogoList outList = new LogoList();
while (!data.empty()) {
String name = (String) data.first();
data.butFirstF();
Object value = data.first();
data.butFirstF();
listTemp.fputF(value);
listTemp.fputF(name);
outList.fputF(name);
}
data = listTemp;
return outList;
}
COM: <s> returns a list of all property indexes contained within the </s>
|
funcom_train/26100567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer evaluate(AssignmentProblemSolution sol) {
int s = 0;
for(int i=0;i<LETTER_COUNT;i++) {
//System.out.println(sol.getAssignment(i))
int temp = objectsWeight[sol.getAssignment(i)]+
positionsWeights[i];
for(int j=0;j<LETTER_COUNT;j++) {
temp += posDist[i][j]*
flow[sol.getAssignment(i)][sol.getAssignment(j)];
}
s+= temp;
}
return new Integer(s);
}
COM: <s> evaluates value of a cost function of current solution </s>
|
funcom_train/7342821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object loadResult() throws SQLException {
if (Collection.class.isAssignableFrom(targetType)) {
InvocationHandler handler = new LazyResultLoader(client, statementName, parameterObject, targetType);
ClassLoader cl = targetType.getClassLoader();
return Proxy.newProxyInstance(cl, LIST_INTERFACES, handler);
} else {
return ResultLoader.getResult(client, statementName, parameterObject, targetType);
}
}
COM: <s> loads the result </s>
|
funcom_train/41016287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDouble(int index) throws JSONException {
Object o = get(index);
try {
if (o instanceof String)
return Double.valueOf((String)o).doubleValue();
else
return Double.parseDouble(o.toString());
} catch (Exception e) {
throw new JSONException("JSONArray[" + index +
"] is not a number.");
}
}
COM: <s> get the double value associated with an index </s>
|
funcom_train/16482606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onBeginReview(int beginAt, boolean endoldreview) {
// TODO: Unselect the currently selected cards if we are browsing?
data.getStream().beginReview();
if (data.getStream().getCurrentCardID() == -1) {
JOptionPane.showMessageDialog(null, Strings.get(77), Strings
.get(78), JOptionPane.INFORMATION_MESSAGE);
return;
}
setUpReviewInterface();
}
COM: <s> called when the user requests a review to begin </s>
|
funcom_train/23245326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void endMovement() {
if (!movementInPlace)
return;
movementInPlace = false;
if (oldCursor != null)
((JComponent) nc).setCursor(oldCursor);
else
((JComponent) nc).setCursor(Cursor.getDefaultCursor());
mousePosMove = null;
oldCursor = null;
}
COM: <s> end the movement </s>
|
funcom_train/48102209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play(){
try {
// return if media content type is not supported or the player is disabled
if (!isMediaSupported("audio/x-wav") || !isEnabled)
return;
// create player
if (player == null){
InputStream input = getClass().getResourceAsStream("/error.wav");
player = Manager.createPlayer(input, "audio/x-wav");
}
// play sound
player.start();
} catch (MediaException e) {
} catch (IOException e) {
} catch (Exception e) {
}
}
COM: <s> plays the speed tracker error sound </s>
|
funcom_train/18606872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getIso19139 () {
Element ele = new Element("MD_Keywords", NS_GMD);
Element el = new Element("keyword", NS_GMD);
Element cs = new Element("CharacterString", NS_GCO);
cs.setText(this.value);
Element type = KeywordBean.createKeywordTypeElt(this);
Element thesaurusName = KeywordBean.createThesaurusNameElt(this);
el.addContent(cs);
ele.addContent(el);
ele.addContent(type);
ele.addContent(thesaurusName);
return ele;
}
COM: <s> transform a keyword bean object into its </s>
|
funcom_train/21941217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field50 getField50() {
if (getSwiftMessage() == null) {
throw new IllegalStateException("SwiftMessage was not initialized");
}
if (getSwiftMessage().getBlock4() == null) {
log.info("block4 is null");
return null;
} else {
final Tag t = getSwiftMessage().getBlock4().getTagByName("50");
if (t == null) {
log.fine("field 50 not found");
return null;
} else {
return new Field50(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 50 </s>
|
funcom_train/28686908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String compileIrspLrcString(String message, boolean header) {
String lrcStr;
Integer lrcInt = compileIrspLrcInt(message, header);
lrcStr = Integer.toHexString(lrcInt);
if (lrcStr.length() == 1) {
lrcStr = "0".concat(lrcStr);
}
return lrcStr;
}
COM: <s> compile and return the lrc as per irsp in string format </s>
|
funcom_train/44158132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clearAll() {
assertTrue(m_offliner.isOnline());
m_offliner.clearLocal();
getPersonDao().deleteAll();
getSimplePersonDao().deleteAll();
assertEquals(0, getPersonDao().findCountByCriteria(
DetachedCriteria.forClass(Person.class)));
assertEquals(0, getSimplePersonDao().findCountByCriteria(
DetachedCriteria.forClass(SimplePerson.class)));
}
COM: <s> clear the local and remote databases </s>
|
funcom_train/50465711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeCacheProperties() {
try {
File cachePropsFile = new File(rootDir, "cache.properties");
FileOutputStream out = new FileOutputStream(cachePropsFile);
cacheProperties.store(out, null);
out.close();
}
catch(IOException ioExp) {
logger.log(Level.WARNING, "Error Writing Cache Settings:"+ioExp.getMessage(), ioExp);
}
}
COM: <s> store cache settings to props file </s>
|
funcom_train/44796961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopService() throws ReflectorInvalidStateException {
if (!state.equals(State.STARTED) && !state.equals(State.STARTING)) {
throw new ReflectorInvalidStateException("State of reflector expected to be " + State.STARTED + " or " +
State.STARTING + " but was " + state);
}
state = State.STOPPING;
state = State.STOPPED;
}
COM: <s> disable all reflectors and make this instance inoperable </s>
|
funcom_train/16218690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Sprite member) {
this.sprites[this.size] = member;
member.setBackground(this.background);
if (++this.size >= this.sprites.length) {
// time to enlarge sprite storage
this.sprites = (Sprite[]) Utility.expand(this.sprites, this.expandFactor);
}
}
COM: <s> inserts sprite at the bottom last index of this group </s>
|
funcom_train/7669504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String res = "@" + klazz.getName() + "(";
for(int i = 0; i < elements.length; i++) {
if ( i != 0 ) {
res += ", ";
}
res += elements[i].toString();;
}
return res + ")";
}
COM: <s> provides detailed description of this annotation instance </s>
|
funcom_train/15617000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parse(JFlexLexer lexer, String raw, Object... args) throws ParserException {
if (raw.equals("~~~")) {
return this.buildWikiSignature(lexer, true, false);
}
if (raw.equals("~~~~")) {
return this.buildWikiSignature(lexer, true, true);
}
if (raw.equals("~~~~~")) {
return this.buildWikiSignature(lexer, false, true);
}
return raw;
}
COM: <s> parse a mediawiki signature of the form and return the resulting </s>
|
funcom_train/4878390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Shape3D getLabelInternalShape() {
assert getLabelText3D() != null : "getLabelText3D() is null";
if (labelInternalShape == null) {
labelInternalShape = new Shape3D(getLabelText3D(), getLabelAppearance());
labelInternalShape.setCapability(ALLOW_GEOMETRY_WRITE);
labelInternalShape.setCapability(ALLOW_APPEARANCE_WRITE);
}
return labelInternalShape;
}
COM: <s> gets the value of label internal shape </s>
|
funcom_train/23288478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushMessage(String msg){
int tk = 375;
for(int i = 0; i < Textt.length; i++){
if(Textt[i] != null){
tk += 15;
}
}
if(tk == 495){ // Max, clear all
for(int i = 0; i < Textt.length; i++){
Textt[i] = null;
tk = 375;
}
}
int ptr = 0;
for(int i = 0; i < Textt.length; i++){
if(Textt[i] == null){
ptr = i;
break;
}
}
Textt[ptr] = msg;
}
COM: <s> puts message in chat box </s>
|
funcom_train/7309753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect) {
ButtonModel bm = ((AbstractButton)c).getModel();
if(bm.isArmed() && bm.isPressed()) {
iconRect.x += 1;
iconRect.y += 1;
}
super.paintIcon(g, c, iconRect);
}
COM: <s> paints the icon a bit lower to the right if were pressed </s>
|
funcom_train/19325611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean traitStartsRow(final FObj fobj, final FoContext context) {
final PdStartsRow property = (PdStartsRow) getProperty(
FoProperty.STARTS_ROW);
if (property != null) {
return property.getValue(context, fobj);
}
return PdStartsRow.getValueNoInstance();
}
COM: <s> returns the starts row property </s>
|
funcom_train/1554772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean rename(String newLabel) {
if (!isRenameable())
return false;
if (newLabel == null)
return false;
newLabel = newLabel.trim();
if (newLabel.length() == 0)
return false;
String oldLabel = label;
if (newLabel.equals(oldLabel))
return false;
else if (cons.isFreeLabel(newLabel)) {
setLabel(newLabel); // now we rename
return true;
} else {
String str[] = { "NameUsed", newLabel };
throw new MyError(app, str);
}
}
COM: <s> renames this geo element to new label </s>
|
funcom_train/42652291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invokeSynchronously() throws TimeoutException, ExecutionException {
ExecutorService pool = getThreadPool(this.loader);
Future f = pool.submit(this);
try {
return f.get(timeout, timeUnit);
} catch(InterruptedException e) {
// this should not happen
throw new RuntimeException(e);
}
}
COM: <s> invokes the current callable in a new thread so that it is possible </s>
|
funcom_train/8690561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNumProcessors() {
try {
Class[] paramTypes = {};
Method availableProcessors =
Runtime.class.getMethod("availableProcessors", paramTypes);
Object[] args = {};
Integer ret = (Integer) availableProcessors.invoke(Runtime.getRuntime(), args);
return ret.intValue();
} catch (Exception e) {
// return a bogus number
return 0;
}
}
COM: <s> determine the number of processors </s>
|
funcom_train/45357052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scaleView(float scale) {
if ( this.scale != scale ) {
this.scale = scale;
// scale layers
PlanarImage scaledImg = ImageHelper.scaleImageTo(image, scale);
for (HILayer layer : layers)
layer.setScale(scaledImg.getWidth(),scaledImg.getHeight());
// display image
this.set(scaledImg);
scaledImg.dispose();
}
}
COM: <s> sets a new background image and adjusts the scale of all polygons accordingly </s>
|
funcom_train/12116139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerModelAndRenderer(IHasRenderer model) {
Class<? extends ModelRenderer> modelRendererClass = this.getClass()
.getAnnotation(RenderedBy.class).value();
ModelRenderer instance;
try {
instance = modelRendererClass.newInstance();
renderers.put(model.getClass(), instance);
} catch (Exception e) {
LOGGER.error(MessagesUtil.getMessage(
Messages.ERROR_INSTANTIATING_RENDERER,
modelRendererClass.getCanonicalName()));
}
}
COM: <s> registers the renderer associated to a model in the repository </s>
|
funcom_train/36960951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String resolveVariable() {
IPathVariableManager pathVariableManager = ResourcesPlugin.getWorkspace().getPathVariableManager();
IPath path= Path.fromOSString(fDependenciesGroup.getLinkTarget());
IPath resolvedPath= pathVariableManager.resolvePath(path);
return resolvedPath.toOSString();
}
COM: <s> tries to resolve the value entered in the link target field as </s>
|
funcom_train/46459533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double imageToWorldX(int n, double imageX, double imageY) {
if (n >= length) setLength(n + 1);
point.setLocation(imageX, imageY);
toWorld.get(n).transform(point, point);
return point.getX();
}
COM: <s> converts the specified image position to a world </s>
|
funcom_train/8407139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(int index, Collection coll) {
// gets initial size
final int sizeBefore = size();
// adds all elements
for (final Iterator it = coll.iterator(); it.hasNext();) {
add(it.next());
}
// compares sizes to detect if collection changed
return sizeBefore != size();
}
COM: <s> adds a collection of objects to the end of the list avoiding duplicates </s>
|
funcom_train/18955612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendZipped(MCRFile file, ZipOutputStream out) throws IOException {
LOGGER.debug("zipping "+file.getPath());
ZipEntry ze = new ZipEntry(file.getPath());
ze.setTime(file.getLastModified().getTime().getTime());
out.putNextEntry(ze);
file.getContentTo(out);
out.closeEntry();
}
COM: <s> send zipped adds a single file to the zip output stream </s>
|
funcom_train/32056379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillCustomItems(Vector items) {
for (int i = 0; i < colors.length; i++) {
VertexView v = new VertexView(" A", dummyGraph, null);
Map map = GraphConstants.createMap();
GraphConstants.setBounds(map, new Rectangle(new Point(0, 0),
new Dimension(14, 15)));
GraphConstants.setForeground(map, colors[i]);
v.setAttributes(map);
items.add(v);
}
}
COM: <s> adds custom colors most frequently used colors in the drop down list </s>
|
funcom_train/26030520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Expression areEqual( Node x, Node y )
{
return new Dyadic( asExpression( x ), "http://jena.hpl.hp.com/constraints/EQ", asExpression( y ) )
{
@Override public boolean evalBool( Object x, Object y )
{ return x.equals( y ); }
};
}
COM: <s> an expression that is true if x and y are equal </s>
|
funcom_train/10794877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerDomains(AliasContext ctx) {
if (_domains != null) {
Collections.sort(_domains, new DomainSorter());
for (AbstractDomainObject domain : _domains) {
ctx.setAlias(domain);
}
}
if (_orderBys != null) {
for (OrderableItem o : _orderBys) {
ExpressionImpl e = o.getExpression();
if (_projections != null && _projections.contains(e))
ctx.setAlias(e);
}
}
}
COM: <s> registers each domain with an alias </s>
|
funcom_train/10018071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBackwardHeadSubstanceCountOfGroup(int group, int i) {
if (group < 0 || m_nodes[group] != GROUP_NODE) {
throw new EXISchemaRuntimeException(
EXISchemaRuntimeException.NOT_GROUP,
new String[] { String.valueOf(group) });
}
return _getBackwardHeadSubstanceCountOfGroup(group, i, m_nodes);
}
COM: <s> returns the number of backward head substance particles for the ith state </s>
|
funcom_train/49923660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File asDirectory(String dirPath) throws FileNotFoundException {
File dir = new File(dirPath);
if (!dir.isDirectory()) {
StringBuffer msg = new StringBuffer(300);
msg.append("Path ");
msg.append(dirPath);
msg.append(" does not exist or is not a directory.");
throw new FileNotFoundException(msg.toString());
}
return new File(dirPath);
}
COM: <s> verifies the incoming path name exists and is a directory if not throws </s>
|
funcom_train/49433527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintChildren(GUI gui) {
if(children != null) {
for(int i=0,n=children.size() ; i<n ; i++) {
Widget child = children.get(i);
if(child.visible) {
child.drawWidget(gui);
}
}
}
}
COM: <s> paints all children in index order </s>
|
funcom_train/51501442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hookContextMenu() {
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
fillContextMenu(manager);
}
});
Menu menu = menuMgr.createContextMenu(getViewer().getControl());
getViewer().getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, getViewer());
}
COM: <s> this method hooks the context menu to the test series tree view </s>
|
funcom_train/16753898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeTableSize () {
tableSize = Math.min (this.getWidth(), this.getHeight()) - 2 * (tableOffset + borderThick);
tableSquareSize = Math.round(((float)tableSize) / 8.0f);
pieceOffset = Math.round((1f - pieceScale) * tableSquareSize * 0.5f);
}
COM: <s> calculates the current table size and square size and offset </s>
|
funcom_train/9758813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean performReplaceSelection() {
if (!validateTargetState())
return false;
String replaceString= getReplaceString();
if (replaceString == null)
replaceString= ""; //$NON-NLS-1$
boolean replaced;
try {
replaceSelection(replaceString, isRegExSearchAvailableAndChecked());
replaced= true;
writeSelection();
} catch (PatternSyntaxException ex) {
statusError(ex.getLocalizedMessage());
replaced= false;
} catch (IllegalStateException ex) {
replaced= false;
}
updateButtonState();
return replaced;
}
COM: <s> replaces the current selection of the target with the users </s>
|
funcom_train/21953016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createDialog() {
dialog = new JDialog();
dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(), BoxLayout.Y_AXIS));
dialog.getContentPane().add(nameLabel);
dialog.getContentPane().add(progressBar);
dialog.getContentPane().add(buttonPanel);
dialog.pack();
}
COM: <s> creates the dialog in which the progress bar will be shown </s>
|
funcom_train/1991658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private class TestObjectForObjectFieldArg {
/**
* Value inspected by validator.
*/
@SuppressWarnings("unused")
@ValidatorWithObjectFieldArg(fieldName="value")
private boolean value;
/**
* Constructs a new test object with the desired value.
*/
public TestObjectForObjectFieldArg(boolean value) {
this.value = value;
}
}
COM: <s> object used for testing code validator with object field arg code </s>
|
funcom_train/5451266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Exchange (int Index1, int Index2) {
Object TempObject;
String TempString;
BeginUpdate();
try {
TempString = getString(Index1);
TempObject = getObject(Index1);
setString(Index1, getString(Index2));
setObject(Index1, getObject(Index2));
setString(Index2, TempString);
setObject(Index2, TempObject);
}
finally {
EndUpdate();
}
}
COM: <s> exchange two items </s>
|
funcom_train/44718528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLResult loadResult(String filename) {
try {
Document doc = m_builder.build(filename);
XMLResult res = (XMLResult) doc.getRootElement();
return res;
} catch(JDOMException e) {
// This is likely due to an empty document
EmptyXMLResult res = new EmptyXMLResult(filename);
return res;
}
}
COM: <s> loads the results into memory </s>
|
funcom_train/13995213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createColumn(ComponentAdapterConfig config) {
TableComponentAdapter adapter = (TableComponentAdapter)
presentation.createComponent(config);
TableColumn column = adapter.getTableColumn();
column.setModelIndex(getModelIndex(config.getProperty()));
column.setCellEditor(new VOCellEditorDecorator(column.getCellEditor(), tableModel));
column.setCellRenderer(new VOCellRendererDecorator(column.getCellRenderer(), tableModel));
getColumnModel().addColumn(column);
}
COM: <s> creates a table column </s>
|
funcom_train/21644250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenu getBattleMenu() {
if (battleMenu == null) {
battleMenu = new JMenu();
battleMenu.setText("Battle");
battleMenu.setMnemonic('B');
battleMenu.setDisplayedMnemonicIndex(0);
battleMenu.add(getBattleNewMenuItem());
battleMenu.add(getBattleOpenMenuItem());
battleMenu.add(new JSeparator());
battleMenu.add(getBattleSaveMenuItem());
battleMenu.add(getBattleSaveAsMenuItem());
battleMenu.add(getBattleExitMenuItem());
battleMenu.addMenuListener(eventHandler);
}
return battleMenu;
}
COM: <s> return the battle menu </s>
|
funcom_train/20175973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTab(Widget widget, int beforeIndex) {
checkInsertBeforeTabIndex(beforeIndex);
ClickDecoratorPanel decWidget = new ClickDecoratorPanel(widget, this);
decWidget.addStyleName(STYLENAME_DEFAULT);
if (isHorizontal()) {
((HorizontalPanel) panel).insert(decWidget, beforeIndex + 1);
} else {
((VerticalPanel) panel).insert(decWidget, beforeIndex + 1);
}
}
COM: <s> inserts a new tab at the specified index </s>
|
funcom_train/982901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put_pixel (int x, int y, int color) {
int xy [] = cal_point_size (x, y);
int i, j;
for (i = xy [0]; i < xy [1]; i++) {
for (j = xy [2]; j < xy [3]; j++) {
super.put_pixel (i, j, color);
}
}
}
COM: <s> draw a point for gl points with size other than 1 </s>
|
funcom_train/18671685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hit(Mine mine) {
if (indestructableUpgrades == 0)
{
int decrement = mine.getDamageAmount();
energy = energy - decrement;
gameStatistics.decreaseEnergy(id,decrement);
if (!isAITank)
{
Server.sendPlayerState(id,"power:" + (energy*100)/Constants.MAX_ENERGY);
}
gameStatistics.increaseHits(mine.getMinePlacer());
}
}
COM: <s> method run when the tank has collided with a mine </s>
|
funcom_train/46759813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeFromCache(RefModel reference) {
if (reference.isNotNew()) {
if (refCache.containsKey(reference.getId())) {
refCache.remove(reference.getId());
}
}
refListRefIdsCache.remove(reference.getReferenceGroup());
final long key = Converter.convertKey(reference.getReferenceGroup(), reference.getRefKey());
try {
refIdKeyCache.put(key, reference.getId());
} catch (Exception ex) {
Log.exception(ex);
}
}
COM: <s> remove this reference item from the local cache </s>
|
funcom_train/3444179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readQuoted(char quote) throws IOException {
buffer.setLength(0);
int c;
while (true) {
for (c = read(); c != quote; c = read()) {
buffer.append((char) c);
}
c = read();
if (c == quote) {
buffer.append(quote);
}
else {
break;
}
}
return c;
}
COM: <s> read a field quoted with a specified quote character </s>
|
funcom_train/32979626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFontsFromState()
{ /* setFontsFromState */
iFontSize= ((mae.rptFontSize.equals("12pt")
? 12
: ((mae.rptFontSize.equals("8pt")
? 8
: 10))));
fontReg= new Font(mae.cfg.fontFamily, Font.PLAIN, iFontSize+2);
} /* setFontsFromState */
COM: <s> set fonts from state set the regular fonts from the state variables </s>
|
funcom_train/37587630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void textPackageNameWeird2() throws BadLocationException, InvalidPackageException {
String weird = "package edu . rice //comment!\n.cs.drjava;";
String normal = "edu.rice.cs.drjava";
_doc.insertString(0, weird, null);
assertEquals("Package name for weird: '" + weird + "'", normal, _doc.getPackageName());
}
COM: <s> test package finding on document with a line comment between parts of package </s>
|
funcom_train/15622504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearStatistics() throws M4Exception {
// Delete old columnset statistics:
Columnset.csstat.setCollectionTo(this, new Vector(0));
// delete old column statistics
Collection columns = this.getColumns();
if ((columns == null) || columns.isEmpty())
return;
Iterator it = columns.iterator();
while (it.hasNext()) {
Column col = (Column) it.next();
col.clearStatistics();
}
this.getTheConcept().clearEstimations();
}
COM: <s> if data changes in the database e </s>
|
funcom_train/35020196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showStatus(final String status, final boolean move) {
Runnable runner = new Runnable() {
@Override
public void run() {
if (move) {
WindowManager.getDefault().getMainWindow().toFront();
}
StatusDisplayer.getDefault().setStatusText(status);
outputWriter.printOutput(status);
}
};
EventQueue.invokeLater(runner);
}
COM: <s> indicate the current the status of the session with a message </s>
|
funcom_train/42049412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSavePreferencesMenuItem() {
if (this.savePreferencesMenuItem == null) {
this.savePreferencesMenuItem = new JMenuItem();
this.savePreferencesMenuItem.setText(MenuBarResources.SAVE_PREFERENCES_MENU_ITEM.getText());
this.savePreferencesMenuItem.addActionListener(new SavePreferencesMenuItemListener());
}
return this.savePreferencesMenuItem;
}
COM: <s> getter for code save preferences menu item code </s>
|
funcom_train/13427537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
this.graph = EuclideanGraphTestData.createGoodCompleteGraph(new DirectedFactory());
LinkedList subList = new LinkedList();
subList.add( this.graph.getEdge("eAB") );
subList.add( this.graph.getEdge("eBC") );
subList.add( this.graph.getEdge("eCA") );
this.fixture = new Subtour( this.graph, subList );
}
COM: <s> perform pre test initialization </s>
|
funcom_train/31111177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SeriesPoints find(Entry e, AbstractDivision div) {
for (Iterator iter = iterator(); iter.hasNext();) {
SeriesPoints p = (SeriesPoints) iter.next();
if (Util.equalsWithNull(p.getEntry(), e)
&& Util.equalsWithNull(p.getDivision(), div))
return p;
}
return null;
}
COM: <s> returns first and hopefully only entry in list for specified race and </s>
|
funcom_train/13304452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMessagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CreateMessage_message_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CreateMessage_message_feature", "_UI_CreateMessage_type"),
NegotiationPackage.Literals.CREATE_MESSAGE__MESSAGE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the message feature </s>
|
funcom_train/24476158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ApplicationBean getBean(String name) throws GfacGUIException{
try {
// To Get HostBean Object
return (ApplicationBean)infoUtils.getBeanObjectInfo(super.getContext().getRegService(), name,this);
} catch (Exception e) {
logger.severe(e.getLocalizedMessage());
super.setErrorString(e.getLocalizedMessage());
throw new GfacGUIException(e);
}
}
COM: <s> get application object to use for edit </s>
|
funcom_train/13576465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addScoringFunction(BasicScoring scoringFunction) {
basicScoringFunctions.add(scoringFunction);
if (scoringFunction instanceof ActivityScoring) {
activityScoringFunctions.add((ActivityScoring) scoringFunction);
}
if (scoringFunction instanceof AgentStuckScoring) {
agentStuckScoringFunctions.add((AgentStuckScoring) scoringFunction);
}
if (scoringFunction instanceof LegScoring) {
legScoringFunctions.add((LegScoring) scoringFunction);
}
if (scoringFunction instanceof MoneyScoring) {
moneyScoringFunctions.add((MoneyScoring) scoringFunction);
}
}
COM: <s> add the scoring function the list of functions it implemented the </s>
|
funcom_train/11321082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SchedulerService getSchedulerService() {
if (schedulerService == null) {
ServletContext servletContext = getContext().getServletContext();
StdSchedulerFactory schedulerFactory = (StdSchedulerFactory)
servletContext.getAttribute(QuartzInitializerListener.QUARTZ_FACTORY_KEY);
if (schedulerFactory != null) {
schedulerService = new SchedulerService(schedulerFactory);
}
}
return schedulerService;
}
COM: <s> return the scheduler service </s>
|
funcom_train/34504948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDeviceInfo(MidiDevice.Info deviceInfo) {
if (deviceInfo==null) {
nameField.setText(null);
vendorField.setText(null);
versionField.setText(null);
descriptionArea.setText(null);
} else {
nameField.setText(deviceInfo.getName());
vendorField.setText(deviceInfo.getVendor());
versionField.setText(deviceInfo.getVersion());
descriptionArea.setText(deviceInfo.getDescription());
}
this.deviceInfo = deviceInfo;
}
COM: <s> setter for property device info </s>
|
funcom_train/8639997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculateHeightsFast() {
if (totalWidth <= 0)
return;
totalHeight = 0;
for (int k = 0; k < rows.size(); ++k) {
PdfPRow row = (PdfPRow)rows.get(k);
if (row != null)
totalHeight += row.getMaxHeights();
}
}
COM: <s> calculates the heights of the table </s>
|
funcom_train/7621254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleSoftInputFromWindow(IBinder windowToken, int showFlags, int hideFlags) {
synchronized (mH) {
if (mServedView == null || mServedView.getWindowToken() != windowToken) {
return;
}
if (mCurMethod != null) {
try {
mCurMethod.toggleSoftInput(showFlags, hideFlags);
} catch (RemoteException e) {
}
}
}
}
COM: <s> this method toggles the input method window display </s>
|
funcom_train/21995439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rec getRec(Object key, Hashtable args) throws DatabaseException {
ConnectionPool pool = null;
Connection conn = null;
try {
pool = ConnectionPool.getInstance();
conn = pool.getConnection();
return getRec(conn, key, args);
}
finally {
if (pool != null)
pool.releaseConnection(conn);
}
}
COM: <s> obtain a single rec for the key </s>
|
funcom_train/22406379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void afterPropertiesSet() throws Exception {
for (Map.Entry<String, Object> entry : _mapping.entrySet()) {
registerHandler(entry.getKey(), createServiceInstance(entry.getValue(), ReflectionUtils.getExposedInterfaces(entry.getValue()
.getClass())));
}
this._mapping = null;
}
COM: <s> invoked automatically by spring after initialisation </s>
|
funcom_train/26485772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save() {
boolean rv = true;
try {
FileOutputStream ostream = new FileOutputStream(m_filename);
ObjectOutputStream p = new ObjectOutputStream(ostream);
p.writeObject(m_config);
p.flush();
ostream.close();
}
catch(Exception x) {
rv = false;
}
return rv;
}
COM: <s> save the config </s>
|
funcom_train/47968472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setProgress(float progress) throws IllegalArgumentException {
if (progress < 0.0f || progress > 1.0f) {
throw new IllegalArgumentException(
"progress have to be in range 0.0 to 1.0: " + progress);
}
if (isIndeterminate) {
return;
}
synchronized (listenerLock) {
boolean progressChanged = this.progress != progress;
if (progressChanged) {
this.progress = progress;
if (listeners != null) {
for (IExtendedCallableListener l : listeners) {
l.progessChanged(progress);
}
}
}
}
}
COM: <s> sets the current progress and informs listeners about this change </s>
|
funcom_train/8072835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateEquivalentObjectProperties(OWLObjectProperty property) {
for (OWLOntology ont : ontologies()){
for (OWLEquivalentObjectPropertiesAxiom ax : ont.getEquivalentObjectPropertiesAxioms(property)){
Object[] clases = ax.getObjectPropertiesInSignature().toArray();
OWLObjectProperty c1 = (OWLObjectProperty) clases[0];
OWLObjectProperty c2 = (OWLObjectProperty) clases[1];
EquivalentEdge eje = new EquivalentEdge(c1, c2);
if (c1 != null && c2 != null)
this.addConnection(c1, c2, eje);
}
}
}
COM: <s> update the equivalent object properties for an owl object property </s>
|
funcom_train/50164807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(FloatArrayList[] temp) {
for(int x = 0; x<temp[0].size(); x++) {
gcoords[0].add(temp[0].get(x));
gcoords[1].add(temp[1].get(x));
gcoords[2].add(temp[2].get(x));
}
}
COM: <s> adds an array of vertices to the current gcoords array </s>
|
funcom_train/28282185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setIcon(String filename) {
URL url = null;
try {
// try to change the default icon
url = new URL(BugzillaUiPlugin.getDefault().getBundle().getEntry("/"), filename);
setImageDescriptor(ImageDescriptor.createFromURL(url));
} catch (MalformedURLException e) {
// Simply don't change the default icon
}
}
COM: <s> set the actions icon </s>
|
funcom_train/22206627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getScopedNames(boolean includeMergedTopics) {
if (m_provider.isTransactionOpen()) {
return getScopedNames(m_provider.getOpenTransaction(), includeMergedTopics);
} else {
ProviderTransaction txn = m_provider.openTransaction();
try {
return getScopedNames(txn, includeMergedTopics);
} finally {
txn.rollback();
}
}
}
COM: <s> generates a list of all names of the topic qualified by the </s>
|
funcom_train/39189361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDoubleByFieldName( String ColName) {
int f_size = Fields.size();
for ( int f_pos = 0; f_pos < f_size; f_pos ++ ) {
Field f_this = (Field) Fields.get( f_pos);
if ( f_this.getField() .equals( ColName))
return( doubleValue[f_pos]);
}
return 0.0;
}
COM: <s> gets the double value of the column whose name matches col name </s>
|
funcom_train/40943903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireWindowAttachEvent(Window window) {
// Fires the window attach event
if (windowAttachListeners != null) {
final Object[] listeners = windowAttachListeners.toArray();
final WindowAttachEvent event = new WindowAttachEvent(window);
for (int i = 0; i < listeners.length; i++) {
((WindowAttachListener) listeners[i]).windowAttached(event);
}
}
}
COM: <s> send information to all listeners about new windows associated with this </s>
|
funcom_train/25245563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveConfig() {
try {
this.properties.store(new FileOutputStream(dataPath + file), "Config");
} catch (Exception ex) {
//Logger.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex);
throw new RuntimeException("Can't save file");
}
}
COM: <s> save the config file </s>
|
funcom_train/49789333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void usedClasses(EClass cls, Set<EClass> set) {
if (!containsKey(cls)) {
put(cls, new HashMap<EClass, Integer>());
}
for (EClass c : set) {
if (!get(cls).containsKey(c)) {
get(cls).put(c, 0);
}
get(cls).put(c, get(cls).get(c) + 1);
}
}
COM: <s> all of the given classes have been used in an instance of the </s>
|
funcom_train/2278471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDOMTree() {
// create the root element <Books>
Element rootEle = dom.createElement("UpdateFiles");
dom.appendChild(rootEle);
// No enhanced for
Iterator<UpdateExtractorUpdateFile> it = updatesFiles.iterator();
while (it.hasNext()) {
UpdateExtractorUpdateFile updateExtractorUpdateFile = it.next();
// For each Book object create <Book> element and attach it to root
Element extendedUpdateEle = createUpdateFileElement(updateExtractorUpdateFile);
rootEle.appendChild(extendedUpdateEle);
}
}
COM: <s> the real workhorse which creates the xml structure </s>
|
funcom_train/9977728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHexToInt() {
System.out.println("hexToInt");
String value = "a8";
Integer expResult = 168;
Integer result = 0;
try {
result = NumeralSystem.hexToInt(value);
}
catch(Exception ex) {
System.out.println("Exception");
assertEquals(true, false);
}
assertEquals(expResult, result);
}
COM: <s> test of hex to int method of class numeral system </s>
|
funcom_train/37190065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPrimarykey(String tableName, String primaryKey) throws SQLException {
final Statement statement = (Statement)(serverAccess.runStatement(serverAccess.STATEMENT_EXECUTE, "ALTER TABLE "+tableName+" ADD PRIMARY KEY ("+primaryKey+")"));
if(statement != null) {
final Connection connection = statement.getConnection();
statement.close();
if(!connection.getAutoCommit()) connection.commit();
}
}
COM: <s> adds a prinary key to a database table </s>
|
funcom_train/2302193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void splitWithInput(MinimizeTreeNode node) {
if (!canExpand(node)) return;
if (node.getTerminal().equals("")) {
if (!minimizer.isSplittable(node.getStates(), getAutomaton(),
getTree())) {
JOptionPane.showMessageDialog(view, CANT_SPLIT);
return;
}
// We need to get a terminal for this node!
if (!splitOnTerminal(node)) return;
}
split(node);
}
COM: <s> this does the splitting of a state for you asking for a </s>
|
funcom_train/22345394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getWlBusy () {
// return the number of entries that are busy
int i, count = 0;
// loop thru all the detail entries in this waitlist
for (i = 0; i < nbr_entries; i++) {
// When status: 0=not busy, 1=busy
if (details[i] != 0) {
// incre count
count++;
} // endif
} // end-for
return count;
} // end-method
COM: <s> find the number of entries that are busy </s>
|
funcom_train/17921714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWebPage(WebPage page) {
if (page == null) {
return;
}
if (webPages == null) {
webPages = new ArrayList();
}
int pos = webPages.indexOf(page);
if (pos < 0) {
webPages.add(page);
} else {
webPages.set(pos, page);
}
}
COM: <s> adds a new web page </s>
|
funcom_train/49425458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initWithText(final String newText) {
this.text = new StringBuffer();
if (newText != null) {
this.text.append(newText);
}
this.cursorPosition = 0;
this.selectionStart = -1;
this.selectionEnd = -1;
this.selecting = false;
this.selectionStartIndex = -1;
}
COM: <s> init instance wit the given text </s>
|
funcom_train/44148748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findReplace(String find,String replace,boolean ignoreCase){
for(int i=0;i<flowPosVec.size();i++){
FisBase b = ((FlowPosition)flowPosVec.elementAt(i)).desktopBase.base;
doReplace(find,replace,b.getComponentPanel().getComponents(),null,null,ignoreCase);
}
}
COM: <s> this method goes through open widgets and finds replaces </s>
|
funcom_train/35751512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setFont(new java.awt.Font("Courier New", java.awt.Font.PLAIN, 12));
jScrollPane.setViewportView(getJTextArea());
}
return jScrollPane;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/5395882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadUTF() throws Exception {
System.out.println("readUTF");
BlockDataInputStream instance = null;
String expResult = "";
String result = instance.readUTF();
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 read utf method of class org </s>
|
funcom_train/22501513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyleRanges(int[] ranges, StyleRange[] styles) {
checkWidget();
if (isListening(LineGetStyle)) return;
if (ranges == null || styles == null) {
setStyleRanges(0, 0, null, null, true);
} else {
setStyleRanges(0, 0, ranges, styles, true);
}
}
COM: <s> sets styles to be used for rendering the widget content </s>
|
funcom_train/5874311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Page page) {
((PageCtrl)page).init(_id, _title, _style);
final List scripts = getLanguageDefinition().getScripts();
if (!scripts.isEmpty()) {
final Namespace ns = Namespaces.beforeInterpret(null, page);
try {
for (Iterator it = scripts.iterator(); it.hasNext();)
page.interpret((String)it.next(), ns);
} finally {
Namespaces.afterInterpret(ns);
}
}
}
COM: <s> initializes a page after execution is activated </s>
|
funcom_train/34898026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleRequest(Request request, IRequestErrorHandler errorHandler) {
if (request instanceof ProjectSaveRequest)
handleProjectSaveRequest((ProjectSaveRequest)request, errorHandler);
else if (request instanceof ProjectSetupSaveRequest)
handleProjectSetupSaveRequest((ProjectSetupSaveRequest)request, errorHandler);
else
errorHandler.handleRequestFailed(new CorraException(getErrorMessage()));
}
COM: <s> handles request for saving an entire project or just the project setup </s>
|
funcom_train/32075799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disconnect(BufferedReader in, BufferedWriter out) throws IOException, Exception {
String cmd = QUIT + CLF;
log.append(cmd);
out.write(cmd);
out.flush();
String ok = in.readLine();
log.append(ok + CLF);
if (ok == null || !ok.startsWith(AK))
throw new Exception(ok + " [cmd: " + cmd.trim() + "]");
}
COM: <s> closes connection to pop server </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.