buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private ObjectWalk setUpWalker(
final Collection<? extends ObjectId> interestingObjects,
final Collection<? extends ObjectId> uninterestingObjects,
final boolean ignoreMissingUninteresting)
throws MissingObjectException, IOException,
IncorrectObjectTypeException {
final ObjectWalk walker = new ObjectW... | private ObjectWalk setUpWalker(
final Collection<? extends ObjectId> interestingObjects,
final Collection<? extends ObjectId> uninterestingObjects,
final boolean ignoreMissingUninteresting)
throws MissingObjectException, IOException,
IncorrectObjectTypeException {
final ObjectWalk walker = new ObjectW... |
protected void doConnexionAdministrateur(HttpServletRequest req, HttpServletResponse resp, HttpSession session) throws IOException, InvalidKeyException, NoSuchAlgorithmException, DatabaseException, SQLException, ServletException {
BddGestion bdd = new BddGestion();
// Récupération des identifiants passés en pa... | protected void doConnexionAdministrateur(HttpServletRequest req, HttpServletResponse resp, HttpSession session) throws IOException, InvalidKeyException, NoSuchAlgorithmException, DatabaseException, SQLException, ServletException {
BddGestion bdd = new BddGestion();
// Récupération des identifiants passés en pa... |
public void execute()
throws MojoExecutionException, MojoFailureException
{
super.execute();
// goals may be splitted into multiple line in configuration.
// Let's build a single line command
goals = StringUtils.join( StringUtils.split( goals ), " " );
try
{
... | public void execute()
throws MojoExecutionException, MojoFailureException
{
super.execute();
// goals may be splitted into multiple line in configuration.
// Let's build a single line command
if ( goals != null )
{
goals = StringUtils.join( StringUtils.split( goals ), " " );
}
... |
public Object invoke(List<ServiceReference> services, Method method, Object... args) throws Throwable {
for (ServiceReference ref : services) {
Object service = bundleContext.getService(ref);
try {
method.invoke(service, args);
} catch (InvocationTargetExc... | public Object invoke(List<ServiceReference> services, Method method, Object... args) throws Throwable {
for (ServiceReference ref : services) {
Object service = bundleContext.getService(ref);
try {
method.invoke(service, args);
} catch (InvocationTargetExc... |
public void init(int workerId, Properties props) throws CryptoTokenInitializationFailureException {
final String defaultKey = props.getProperty("defaultKey", KEY_ALIAS_1);
final byte[] certbytes;
final byte[] passTestKey;
if (KEY_ALIAS_2.equals(defaultKey)) {
... | public void init(int workerId, Properties props) throws CryptoTokenInitializationFailureException {
final String defaultKey;
if (props == null) {
defaultKey = KEY_ALIAS_1;
} else {
defaultKey = props.getProperty("defaultKey", KEY_ALIAS_1);
... |
private String buildHTMLLegend(ModifiedCompound mc) {
StringBuilder b = new StringBuilder();
//b.append(mc.toString());
ProteinModification mod = mc.getModification();
b.append(mod.toString());
if ( mod.getResidId() != null ){
b.append(" <i>RESID</i>:<a target=\"_blank\" href=\"http://srs.ebi.ac.uk/... | private String buildHTMLLegend(ModifiedCompound mc) {
StringBuilder b = new StringBuilder();
//b.append(mc.toString());
ProteinModification mod = mc.getModification();
b.append(mod.toString());
if ( mod.getResidId() != null ){
b.append(" <i>RESID</i>:<a target=\"_blank\" href=\"http://srs.ebi.ac.uk/... |
protected void doPost( HttpServletRequest request,HttpServletResponse response )
throws ServletException, IOException {
PrintWriter out = response.getWriter();
// String ticker= request.getParameter("ticker");
// String volume = request.getParameter("volume");
// System.out.println("***********************"+username... | protected void doPost( HttpServletRequest request,HttpServletResponse response )
throws ServletException, IOException {
PrintWriter out = response.getWriter();
// String ticker= request.getParameter("ticker");
// String volume = request.getParameter("volume");
// System.out.println("***********************"+username... |
private void buildAndUpdateCache() {
final Layout layout = getLayout();
final int left = getCompoundPaddingLeft();
final int top = getExtendedPaddingTop();
final float prevAlpha = getAlpha();
mTextCacheLeft = layout.getLineLeft(0) - getCacheLeftPadding();
mTextCacheT... | private void buildAndUpdateCache() {
final Layout layout = getLayout();
final int left = getCompoundPaddingLeft();
final int top = getExtendedPaddingTop();
final float prevAlpha = getAlpha();
mTextCacheLeft = layout.getLineLeft(0) - getCacheLeftPadding();
mTextCacheT... |
public View getView(int position, View convertView, ViewGroup parent) {
if (mIsMiniMonth) {
return super.getView(position, convertView, parent);
}
MonthWeekEventsView v;
LayoutParams params = new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_... | public View getView(int position, View convertView, ViewGroup parent) {
if (mIsMiniMonth) {
return super.getView(position, convertView, parent);
}
MonthWeekEventsView v;
LayoutParams params = new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_... |
protected void internalAttach(final Object context, final IPropertiesContainer data, final ICallback callback) {
Assert.isTrue(!Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
Assert.isNotNull(context);
Assert.isNotNull(data);
Assert.isNotNull(callback);
if (context instanceof IModelNo... | protected void internalAttach(final Object context, final IPropertiesContainer data, final ICallback callback) {
Assert.isTrue(!Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
Assert.isNotNull(context);
Assert.isNotNull(data);
Assert.isNotNull(callback);
if (context instanceof IModelNo... |
public static Result postJob() {
if (FirstUse.isFirstUse())
return redirect(routes.FirstUse.getFirstUse());
User user = User.authenticate(session("userid"), session("email"), session("password"));
if (user == null)
return redirect(routes.Login.login());
Logger.debug("------------------------------ Post... | public static Result postJob() {
if (FirstUse.isFirstUse())
return redirect(routes.FirstUse.getFirstUse());
User user = User.authenticate(session("userid"), session("email"), session("password"));
if (user == null)
return redirect(routes.Login.login());
Logger.debug("------------------------------ Post... |
public Flee(Actor a)
{
name = "Flee";
}
| public Flee(Actor a)
{
name = "Run";
}
|
public static void configParse(Arena arena, Config cfg) {
cfg.load();
YamlConfiguration config = cfg.getYamlConfiguration();
if (cfg.getString(CFG.GENERAL_TYPE, "null") != null && !cfg.getString(CFG.GENERAL_TYPE, "null").equals("null")) {
// opening existing arena
arena.setFree(cfg.getString(CFG.GENERAL_T... | public static void configParse(Arena arena, Config cfg) {
cfg.load();
YamlConfiguration config = cfg.getYamlConfiguration();
if (cfg.getString(CFG.GENERAL_TYPE, "null") != null && !cfg.getString(CFG.GENERAL_TYPE, "null").equals("null")) {
// opening existing arena
arena.setFree(cfg.getString(CFG.GENERAL_T... |
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menuspeakquestion:
{
if(questionTTS != null && currentItem != null){
questionTTS.sayText(currentItem.getQuestion());
}
retur... | public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menuspeakquestion:
{
if(questionTTS != null && currentItem != null){
questionTTS.sayText(currentItem.getQuestion());
}
retur... |
public int fire(String event, Scheduler scheduler) {
if(state==STATES.IDLE) {
if(event.equals(START)) {
t1.start(scheduler, 1000);
state = STATES.ACTIVE;
return EXECUTE_TRANSITION;
}
} else if(state==STATES.ACTIVE) {
if(event.equals(STOP)) {
t1.start(scheduler, 1000);
state = STATES.... | public int fire(String event, Scheduler scheduler) {
if(state==STATES.IDLE) {
if(event.equals(START)) {
t1.start(scheduler, 1000);
state = STATES.ACTIVE;
return EXECUTE_TRANSITION;
}
} else if(state==STATES.ACTIVE) {
if(event.equals(STOP)) {
t1.stop();
state = STATES.IDLE;
return... |
HashMap<String, String> getRoleActivityTypeLiteralOptions() {
HashMap<String, String> literalOptions = new HashMap<String, String>();
literalOptions.put("", "Select one");
literalOptions.put("http://vivoweb.org/ontology/core#Person", "Person");
//literalOptions.put("http://vivoweb.org/ontology/core... | HashMap<String, String> getRoleActivityTypeLiteralOptions() {
HashMap<String, String> literalOptions = new HashMap<String, String>();
literalOptions.put("", "Select one");
literalOptions.put("http://vivoweb.org/ontology/core#FacultyMember", "Person");
//literalOptions.put("http://vivoweb.org/ontolo... |
protected void execute() {
if (TrackingCamera.targetGoal == null){ // If no target is found
leftShootingMotors.setSetpoint(1000); // Set Left shooting Motors to Full Speed
rightShootingMotors.setSetpoint(1000); // Set Right Shooting Motors to Full Speed
System.out.p... | protected void execute() {
if (TrackingCamera.targetGoal == null){ // If no target is found
leftShootingMotors.setSetpoint(1000); // Set Left shooting Motors to Full Speed
rightShootingMotors.setSetpoint(1000); // Set Right Shooting Motors to Full Speed
System.out.p... |
public void ClearWorldGuardRegions(String playerName)
{
// Do Something...
List<World> worlds = bansyncinterface.getServer().getWorlds();
for (World w : worlds) {
RegionManager rm = wg.getRegionManager(w);
Map<String, ProtectedRegion> regions = rm.getRegions();
for (String id : regions.keySet())... | public void ClearWorldGuardRegions(String playerName)
{
// Do Something...
List<World> worlds = bansyncinterface.getServer().getWorlds();
for (World w : worlds) {
RegionManager rm = wg.getRegionManager(w);
Map<String, ProtectedRegion> regions = rm.getRegions();
for (String id : regions.keySet())... |
public void init() {
ctx.validateCurrent();
if( isAvailable()) {
return;
}
if( !ctx.isGLDebugEnabled() ) {
if(DEBUG) {
System.err.println("GLDebugMessageHandler: GL DEBUG not set in ARB ctx options: "+ctx.getGLVersion());
}... | public void init() {
ctx.validateCurrent();
if( isAvailable()) {
return;
}
if( !ctx.isGLDebugEnabled() ) {
if(DEBUG) {
System.err.println("GLDebugMessageHandler: GL DEBUG not set in ARB ctx options: "+ctx.getGLVersion());
}... |
public Point2D getDimensionInPixel(Map<String,Value> map, double height,
double width, Double scale, Double dpi) throws ParameterException {
double dx, dy;
double ratio = height / width;
if (x != null && y != null) {
d... | public Point2D getDimensionInPixel(Map<String,Value> map, double height,
double width, Double scale, Double dpi) throws ParameterException {
double dx, dy;
double ratio = height / width;
if (x != null && y != null) {
d... |
public static File getNodejsBasedir() {
/*
* String s = "name: " + System.getProperty ("os.name"); s +=
* ", version: " + System.getProperty ("os.version"); s += ", arch: " +
* System.getProperty ("os.arch"); System.out.println ("OS=" + s);
*/
String os =System.getProperty ("osgi.os");
System.out.pri... | public static File getNodejsBasedir() {
/*
* String s = "name: " + System.getProperty ("os.name"); s +=
* ", version: " + System.getProperty ("os.version"); s += ", arch: " +
* System.getProperty ("os.arch"); System.out.println ("OS=" + s);
*/
String os =System.getProperty ("osgi.os");
System.out.pri... |
public void sendHtmlMailReport(SummaryReport summaryReport, String wikiPageUrl, Properties extProperties) {
String buildNumber = extProperties.getProperty("buildVersion");
String majorVersion = extProperties.getProperty("majorVersion");
String minorVersion = extProperties.getProperty("minorV... | public void sendHtmlMailReport(SummaryReport summaryReport, String wikiPageUrl, Properties extProperties) {
String buildNumber = extProperties.getProperty("buildVersion");
String majorVersion = extProperties.getProperty("majorVersion");
String minorVersion = extProperties.getProperty("minorV... |
public final Object readObject() throws ClassNotFoundException, IOException
{
if (this.useSubclassMethod)
return readObjectOverride();
boolean was_deserializing;
Object ret_val;
was_deserializing = this.isDeserializing;
boolean is_consumed = false;
boolean old_mode = setBlockDataMod... | public final Object readObject() throws ClassNotFoundException, IOException
{
if (this.useSubclassMethod)
return readObjectOverride();
boolean was_deserializing;
Object ret_val;
was_deserializing = this.isDeserializing;
boolean is_consumed = false;
boolean old_mode = setBlockDataMod... |
private void update(int currentMillis) {
// Are we started ?
if (!isStarted)
return;
// Shall we repeat ?
if ((repeatCnt < 0 || iteration < repeatCnt) && currentMillis >= endRepeatDelayMillis) {
iteration += 1;
start();
return;
}
// Wait for the end of the delay then either grab the start or ... | private void update(int currentMillis) {
// Are we started ?
if (!isStarted)
return;
// Shall we repeat ?
if ((repeatCnt < 0 || iteration < repeatCnt) && currentMillis >= endRepeatDelayMillis) {
iteration += 1;
start();
return;
}
// Wait for the end of the delay then either grab the start or ... |
public boolean mataPeça(Peça peça) {
return (this.getX() - 1 == peça.getX() && this.getY() - 2 == peça.getY()) ||
(this.getX() - 1 == peça.getX() && this.getY() + 2 == peça.getY()) ||
(this.getX() + 1 == peça.getX() && this.getY() - 2 == peça.getY()) ||
(this.get... | public boolean mataPeça(Peça peça) {
return (this.getX() - 1 == peça.getX() && this.getY() - 2 == peça.getY()) ||
(this.getX() - 1 == peça.getX() && this.getY() + 2 == peça.getY()) ||
(this.getX() + 1 == peça.getX() && this.getY() - 2 == peça.getY()) ||
(this.get... |
JsonKursy wyslijKursy(
@RequestParam(value = "userid", required = true) int login,
Model model) {
List<GrupyZajeciowe> grupyzajeciowe = pobierzGrupyService
.pobierzGrupyZajeciowe(login);
int idKursu;
int i;
JsonKursy jsonKursy = new JsonKursy();
JsonGrupy jsonGrupy = new JsonGrupy();
JsonGrupyZa... | JsonKursy wyslijKursy(
@RequestParam(value = "userid", required = true) int login,
Model model) {
List<GrupyZajeciowe> grupyzajeciowe = pobierzGrupyService
.pobierzGrupyZajeciowe(login);
int idKursu;
int i;
JsonKursy jsonKursy = new JsonKursy();
JsonGrupy jsonGrupy = new JsonGrupy();
JsonGrupyZa... |
public void compile(OActivity output, Activity srcx) {
InvokeActivity src = (InvokeActivity)srcx;
OInvoke oinvoke = (OInvoke) output;
oinvoke.partnerLink = _context.resolvePartnerLink(src.getPartnerLink());
oinvoke.operation = _context.resolvePartnerRoleOperation(oinvoke.partnerLink, src.getOperatio... | public void compile(OActivity output, Activity srcx) {
InvokeActivity src = (InvokeActivity)srcx;
OInvoke oinvoke = (OInvoke) output;
oinvoke.partnerLink = _context.resolvePartnerLink(src.getPartnerLink());
oinvoke.operation = _context.resolvePartnerRoleOperation(oinvoke.partnerLink, src.getOperatio... |
public boolean onKey(View v, int keyCode, KeyEvent event) {
try {
final boolean hardKeyboardHidden = manager.hardKeyboardHidden;
// Ignore all key-up events except for the special keys
if (event.getAction() == KeyEvent.ACTION_UP) {
// There's nothing here for virtual keyboard users.
if (!hardKeyboa... | public boolean onKey(View v, int keyCode, KeyEvent event) {
try {
final boolean hardKeyboardHidden = manager.hardKeyboardHidden;
// Ignore all key-up events except for the special keys
if (event.getAction() == KeyEvent.ACTION_UP) {
// There's nothing here for virtual keyboard users.
if (!hardKeyboa... |
public long encrypt(int[] numList) {
for (int r=0; r < numList.length; r++){
if (numList[r] < 1 || numList[r] > 1000){
System.out.println("Number Error; Integer x must follow: 1 <= x <= 1000");
return totalCheck;}
}
if (numList.length > 50 || numList.length < 2){
System.out.println("Number Lis... | public long encrypt(int[] numList) {
for (int r=0; r < numList.length; r++){
if (numList[r] < 1 || numList[r] > 1000){
System.out.println("Number Error; Integer x must follow: 1 <= x <= 1000");
return totalCheck;
}
}
if (numList.length > 50 || numList.length < 2){
System.out.println("Number ... |
public static void main(String[] args) {
System.out.println("Creating Rengine (with arguments)");
// 1) we pass the arguments from the command line
// 2) we won't use the main loop at first, we'll start it later
// (that's the "false" as second argument)
// 3) the callbacks are implemented by the... | public static void main(String[] args) {
// just making sure we have the right version of everything
if (!Rengine.versionCheck()) {
System.err.println("** Version mismatch - Java files don't match library version.");
System.exit(1);
}
System.out.println("Creating Rengine (with arguments)");
/... |
public void onLivingDrop (LivingDropsEvent event)
{
if (event.entityLiving == null)
return;
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
... | public void onLivingDrop (LivingDropsEvent event)
{
if (event.entityLiving == null)
return;
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
... |
public List<OperableTrigger> acquireNextTriggers(long noLaterThan, int maxCount, long timeWindow)
throws JobPersistenceException {
BasicDBObject query = new BasicDBObject();
query.put(TRIGGER_NEXT_FIRE_TIME, new BasicDBObject("$lte", new Date(noLaterThan)));
if (log.isDebugEnabled()) {
log.de... | public List<OperableTrigger> acquireNextTriggers(long noLaterThan, int maxCount, long timeWindow)
throws JobPersistenceException {
BasicDBObject query = new BasicDBObject();
query.put(TRIGGER_NEXT_FIRE_TIME, new BasicDBObject("$lte", new Date(noLaterThan)));
if (log.isDebugEnabled()) {
log.de... |
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
ViewGroup view = (ViewGroup) super.onCreateView(inflater, container,
savedInstanceState);
view.setBackgroundColor(0x00000000); // Set Root View to be transparent
// to prevent black screen on
... | public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
ViewGroup view = (ViewGroup) super.onCreateView(inflater, container,
savedInstanceState);
view.setBackgroundColor(0x00000000); // Set Root View to be transparent
// to prevent black screen on
... |
public void execute() throws BuildException {
if (!JSystemAntUtil.doesContainerHaveEnabledTests(getUuid())) {
return;
}
loadParameters();
final DataProvider provider = initProvider();
try {
data = provider.provide(new File(file), param);
} catch (DataCollectorException e) {
log.log(Level.WARNING... | public void execute() throws BuildException {
if (!JSystemAntUtil.doesContainerHaveEnabledTests(getUuid())) {
return;
}
loadParameters();
final DataProvider provider = initProvider();
try {
// in case file is a reference, if not the file name will be as entered by the user - nir
String fileName = ... |
public void complete(Symbol sym) throws CompletionFailure {
// Suppress some (recursive) MemberEnter invocations
if (!completionEnabled) {
// Re-install same completer for next time around and return.
assert (sym.flags() & Flags.COMPOUND) == 0;
sym.completer = thi... | public void complete(Symbol sym) throws CompletionFailure {
// Suppress some (recursive) MemberEnter invocations
if (!completionEnabled) {
// Re-install same completer for next time around and return.
assert (sym.flags() & Flags.COMPOUND) == 0;
sym.completer = thi... |
static boolean shortcutExists(Context context, String title, Intent intent) {
final ContentResolver cr = context.getContentResolver();
Cursor c = cr.query(LauncherSettings.Favorites.CONTENT_URI,
new String[] { "title", "intent" }, "title=? and intent=?",
new String[] { title,... | static boolean shortcutExists(Context context, String title, Intent intent) {
final ContentResolver cr = context.getContentResolver();
Cursor c = cr.query(LauncherSettings.Favorites.CONTENT_URI,
new String[] { "title", "intent" }, "title=? and intent=?",
new String[] { title,... |
private void initComponents() {
jFileChooserManageDBInstance = new javax.swing.JFileChooser();
jFileChooserManageDBExportInstance = new javax.swing.JFileChooser();
jPMInstanceTable = new javax.swing.JPopupMenu();
jMIAddInstance = new javax.swing.JMenuItem();
jMIRemoveInstanc... | private void initComponents() {
jFileChooserManageDBInstance = new javax.swing.JFileChooser();
jFileChooserManageDBExportInstance = new javax.swing.JFileChooser();
jPMInstanceTable = new javax.swing.JPopupMenu();
jMIAddInstance = new javax.swing.JMenuItem();
jMIRemoveInstanc... |
public JobDownloadResponse download(JobDownloadRequest request) throws Exception {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(API_BASE_URL + "download.ashx");
List<NameValuePair> nvps = GetBaseParams(request);
if(request.fileName == null || request.fileName == ... | public JobDownloadResponse download(JobDownloadRequest request) throws Exception {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(API_BASE_URL + "download.ashx");
List<NameValuePair> nvps = GetBaseParams(request);
if(request.fileName == null || request.fileName == ... |
public JSONObject toJSON(int page, int pageSize) throws JSONException, URISyntaxException, IOException, CoreException {
if (commits == null)
throw new IllegalStateException("'commits' is null");
Map<ObjectId, JSONArray> commitToBranchMap = getCommitToBranchMap(db);
JSONObject result = new JSONObject();
J... | public JSONObject toJSON(int page, int pageSize) throws JSONException, URISyntaxException, IOException, CoreException {
if (commits == null)
throw new IllegalStateException("'commits' is null");
Map<ObjectId, JSONArray> commitToBranchMap = getCommitToBranchMap(db);
JSONObject result = new JSONObject();
J... |
protected final Object doHandleRequest(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
throws IOException {
try {
ServletServerHttpRequest request = this.prepareRequest(servletRequest);
if (!this.supportedMethods.contains(request.getMethod())) {
servletResponse.setStatus(HttpServ... | protected final Object doHandleRequest(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
throws IOException {
try {
ServletServerHttpRequest request = this.prepareRequest(servletRequest);
if (!this.supportedMethods.contains(request.getMethod())) {
servletResponse.setStatus(HttpServ... |
public ModelMap errorStep2(final RequestContext flowRequestContext) {
if (logger.isTraceEnabled()) {
logger.trace("errorStep2:");
}
tangerineListHelper.checkAccess(getRequest(flowRequestContext), PageType.createBatch); // TODO: do as annotation
determineStepToSave(flowReq... | public ModelMap errorStep2(final RequestContext flowRequestContext) {
if (logger.isTraceEnabled()) {
logger.trace("errorStep2:");
}
tangerineListHelper.checkAccess(getRequest(flowRequestContext), PageType.createBatch); // TODO: do as annotation
determineStepToSave(flowReq... |
private boolean uploadViaBootloader(String buildPath, String className)
throws RunnerException, SerialException {
Map<String, String> boardPreferences = Base.getBoardPreferences();
List commandDownloader = new ArrayList();
String protocol = boardPreferences.get("upload.protocol");
// avrdude ... | private boolean uploadViaBootloader(String buildPath, String className)
throws RunnerException, SerialException {
Map<String, String> boardPreferences = Base.getBoardPreferences();
List commandDownloader = new ArrayList();
String protocol = boardPreferences.get("upload.protocol");
// avrdude ... |
protected boolean parseMsg(String body, Data data) {
// Accept anything, but only if there is a valid sender filter
if (ManagePreferences.filter().length() <= 1) return false;
// Starting with CAD: confuses things
if (body.startsWith("CAD:")) body = body.substring(4).trim();
// Stri... | protected boolean parseMsg(String body, Data data) {
// Accept anything, but only if there is a valid sender filter
if (! ManagePreferences.overrideFilter()) return false;
if (ManagePreferences.filter().length() <= 1) return false;
// Starting with CAD: confuses things
if (body.startsWit... |
public void onEnable() {
instance = this;
configManager = new ConfigManager();
jaLogger = new JukeAlertLogger();
snitchManager = new SnitchManager();
groupMediator = new GroupMediator();
registerEvents();
registerCommands();
snitchManager.loadSnitches();
}
| public void onEnable() {
instance = this;
configManager = new ConfigManager();
groupMediator = new GroupMediator();
jaLogger = new JukeAlertLogger();
snitchManager = new SnitchManager();
registerEvents();
registerCommands();
snitchManager.loadSnitches();
}
|
private boolean readCommand(Player player, String command, String[] args) {
if(command.equalsIgnoreCase("setxp")) {
/*
* Set XP level
*/
if (args.length == 0) {
// No arguments sent, report error
player.sendMessage(ChatColor.GOLD + "== SetXP v" + ChatColor.WHITE + getDe... | private boolean readCommand(Player player, String command, String[] args) {
if(command.equalsIgnoreCase("setxp")) {
/*
* Set XP level
*/
if (args.length == 0) {
// No arguments sent, report error
player.sendMessage(ChatColor.GOLD + "== SetXP v" + ChatColor.WHITE + getDe... |
public static void main(String[] args) {
Date start = new Date();
if (args.length < 2) {
System.out.println("Usage: program <input> <clusters>");
System.exit(0);
}
Configuration conf = new Configuration();
Counter converge = null;
Counter total = null;
Counter totalfile = null;
Path in = new P... | public static void main(String[] args) {
Date start = new Date();
if (args.length < 2) {
System.out.println("Usage: program <input> <clusters>");
System.exit(0);
}
Configuration conf = new Configuration();
Counter converge = null;
Counter total = null;
Counter totalfile = null;
Path in = new P... |
public LocalTransaction next(AbstractTransaction dtxn, SpeculationType specType) {
this.interrupted = false;
if (debug.val) {
LOG.debug(String.format("%s - Checking queue for transaction to speculatively execute " +
"[specType=%s, windowSize=%d, queueSize=%... | public LocalTransaction next(AbstractTransaction dtxn, SpeculationType specType) {
this.interrupted = false;
if (debug.val) {
LOG.debug(String.format("%s - Checking queue for transaction to speculatively execute " +
"[specType=%s, windowSize=%d, queueSize=%... |
public void build(Composite parent);
| void build(Composite parent);
|
private void mapMaterials() {
monsterLangMap.put(50, "entity.Creeper.name");
monsterLangMap.put(51, "entity.Skeleton.name");
monsterLangMap.put(52, "entity.Spider.name");
monsterLangMap.put(54, "entity.Zombie.name");
monsterLangMap.put(55, "entity.Slime.name");
monsterLangMap.put(56, "entity.Ghast.name");
... | private void mapMaterials() {
monsterLangMap.put(50, "entity.Creeper.name");
monsterLangMap.put(51, "entity.Skeleton.name");
monsterLangMap.put(52, "entity.Spider.name");
monsterLangMap.put(54, "entity.Zombie.name");
monsterLangMap.put(55, "entity.Slime.name");
monsterLangMap.put(56, "entity.Ghast.name");
... |
private static void copyShadowedLayer(SVNWCDbDir srcPdh, File srcRelpath, long srcOpDepth,
SVNWCDbDir dstPdh, File dstRelpath, long dstOpDepth, long delOpDepth, long reposId, File reposRelPath, long revision) throws SVNException {
Structure<NodeInfo> depthInfo = null;
try {
... | private static void copyShadowedLayer(SVNWCDbDir srcPdh, File srcRelpath, long srcOpDepth,
SVNWCDbDir dstPdh, File dstRelpath, long dstOpDepth, long delOpDepth, long reposId, File reposRelPath, long revision) throws SVNException {
Structure<NodeInfo> depthInfo = null;
try {
... |
private static byte[] getFile(ProjectDB project, FileDB file, LocationDB location) {
if (file.getType() == File.JAR) {
JarIndex index = repo.getJarIndex();
IndexedJar indexed = index.getIndexedJar(file.getHash());
if (indexed == null) {
logger.log(Level.SEVERE, "Unable to find " + file +... | private static byte[] getFile(ProjectDB project, FileDB file, LocationDB location) {
if (file.getType() == File.JAR) {
JarIndex index = repo.getJarIndex();
IndexedJar indexed = index.getIndexedJar(file.getHash());
if (indexed == null) {
logger.log(Level.SEVERE, "Unable to find " + file +... |
public String formatTestResult() {
if (testResult.getExecutionResult() == null) {
return testResult.getMessage() != null ? testResult.getMessage() : originalContent;
}
final String escapedMessage = testResult.hasMessage() ? Utils.escapeHTML(testResult.getMessage()) : originalContent;
... | public String formatTestResult() {
if (testResult.getExecutionResult() == null) {
return testResult.getMessage() != null ? testResult.getMessage() : originalContent;
}
final String escapedMessage = testResult.hasMessage() ? Utils.escapeHTML(testResult.getMessage()) : originalContent;
... |
private int getCursor(MouseEvent e) {
final AttributeTable table = (AttributeTable) e.getComponent();
final Point point = e.getPoint();
final int col = table.columnAtPoint(point);
if(col != 1){
return Cursor.DEFAULT_CURSOR;
}
final int row = table.rowAtPoint(e.getPoint());
if(row >= table.getRow... | private int getCursor(MouseEvent e) {
final AttributeTable table = (AttributeTable) e.getComponent();
final Point point = e.getPoint();
final int col = table.columnAtPoint(point);
if(col != 1){
return Cursor.DEFAULT_CURSOR;
}
final int row = table.rowAtPoint(e.getPoint());
if(row == -1 || row >... |
public static List checkCookies( List dataobjects ) throws IOException {
SourceLevelQuery sourceLevelQuery =
(SourceLevelQuery) Lookup.getDefault().lookup(SourceLevelQuery.class);
RuleSet set = constructRuleSets();
PMD pmd_1_3 = null;
PMD pmd_1_... | public static List checkCookies( List dataobjects ) throws IOException {
SourceLevelQuery sourceLevelQuery =
(SourceLevelQuery) Lookup.getDefault().lookup(SourceLevelQuery.class);
RuleSet set = constructRuleSets();
PMD pmd_1_3 = null;
PMD pmd_1_... |
public String utilityData() {
final DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyyMMdd");
final DateTime yesterday = new DateTime().minusDays(1);
DateTime date = new DateTime(2013, 7, 23, 0, 0, 0);
final StringBuilder sb = new StringBuilder();
sb.append("date\... | public String utilityData() {
final DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyyMMdd");
final DateTime yesterday = new DateTime().minusDays(1);
DateTime date = new DateTime(2014, 4, 15, 0, 0, 0);
final StringBuilder sb = new StringBuilder();
sb.append("date\... |
private void deploy() {
MyLog.v(TAG, "deploy()");
if (!StmDbHelper.isDbExist(this)) {
showSplashScreen();
addProgressBar();
// show a progress dialog
this.progressBar.setIndeterminate(true);
this.progressBarMessageTitle.setVisibility(View.VISIBLE);
this.progressBarMessageTitle.setText(R.string.in... | private void deploy() {
MyLog.v(TAG, "deploy()");
if (!StmDbHelper.isDbExist(this)) {
showSplashScreen();
addProgressBar();
// show a progress dialog
this.progressBar.setIndeterminate(true);
this.progressBarMessageTitle.setVisibility(View.VISIBLE);
this.progressBarMessageTitle.setText(R.string.in... |
public void dataReceived(DataEvent dataEvent)
{
if(dataEvent.type == DataEvent.DATA_READY_TO_START){
if(pm.getMode() == CCInterfaceManager.A2D_10_MODE){
slowUpdate = true;
} else {
slowUpdate = false;
}
numVals = 0;
curPtime = 0;
return;
}
if(slowUpdate){
if(dataEvent.... | public void dataReceived(DataEvent dataEvent)
{
if(dataEvent.type == DataEvent.DATA_READY_TO_START){
if(pm.getMode() == CCInterfaceManager.A2D_10_MODE){
slowUpdate = true;
} else {
slowUpdate = false;
}
numVals = 0;
curPtime = 0;
return;
}
if(slowUpdate){
if(dataEvent.... |
public boolean isVisible(IBindingManager bm) {
if (!super.isVisible(bm))
return false;
return bm.wGet("viewer") instanceof E4GraphicalViewer;
}
| public boolean isVisible(IBindingManager bm) {
if (!super.isVisible(bm))
return false;
return bm.wGetValue("viewer") instanceof E4GraphicalViewer;
}
|
protected Dialog onCreateDialog(int id, Bundle args) {
Dialog dialog = null;
switch(id) {
case NEW_FEED:
dialog = Tools.createSubscriptionDialog(this);
break;
case UNSUBSCRIBE:
dialog = Tools.createUnsubscribeDialog(this,
new DialogInterface.OnClickListener() {
BroadcastReceiver finishedRecei... | protected Dialog onCreateDialog(int id, Bundle args) {
Dialog dialog = null;
switch(id) {
case NEW_FEED:
dialog = Tools.createSubscriptionDialog(this);
break;
case UNSUBSCRIBE:
dialog = Tools.createUnsubscribeDialog(this,
new DialogInterface.OnClickListener() {
BroadcastReceiver finishedRecei... |
public static void deployRelease(final File releaseFile) {
if(yacyBuildProperties.isPkgManager()) {
return;
}
//byte[] script = ("cd " + plasmaSwitchboard.getSwitchboard().getRootPath() + ";while [ -e ../yacy.running ]; do sleep 1;done;tar xfz " + release + ";cp -Rf yacy/* ../../... | public static void deployRelease(final File releaseFile) {
if(yacyBuildProperties.isPkgManager()) {
return;
}
//byte[] script = ("cd " + plasmaSwitchboard.getSwitchboard().getRootPath() + ";while [ -e ../yacy.running ]; do sleep 1;done;tar xfz " + release + ";cp -Rf yacy/* ../../... |
private void applyExecInt() throws JasonException {
confP.step = State.ClrInt; // default next stop
if (conf.C.SI.isFinished()) {
return;
}
// get next formula in the body of the intended means
// on the top of the selected intention
Int... | private void applyExecInt() throws JasonException {
confP.step = State.ClrInt; // default next stop
if (conf.C.SI.isFinished()) {
return;
}
// get next formula in the body of the intended means
// on the top of the selected intention
Int... |
static EMenu makeMenu() {
/****************************** THE WINDOW MENU ******************************/
// bindings for numpad keys. Need extra one because over VNC, they get sent as shift+KP_*
int ctrlshift = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() | InputEvent.SHIFT_MASK;
... | static EMenu makeMenu() {
/****************************** THE WINDOW MENU ******************************/
// bindings for numpad keys. Need extra one because over VNC, they get sent as shift+KP_*
int ctrlshift = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() | InputEvent.SHIFT_MASK;
... |
public IRStatistics evaluate(RecommenderBuilder recommenderBuilder,
DataModelBuilder dataModelBuilder,
DataModel dataModel,
IDRescorer rescorer,
int at,
double rel... | public IRStatistics evaluate(RecommenderBuilder recommenderBuilder,
DataModelBuilder dataModelBuilder,
DataModel dataModel,
IDRescorer rescorer,
int at,
double rel... |
public static String checkFileRenamingWithinWebProjects(SWTWorkbenchBot bot , String oldFileName, String newFileName,
String[] treePathItems , String fileTreeItemSuffix){
bot.sleep(sleepTime);
SWTBot webProjects = eclipse.showView(ViewType.WEB_PROJECTS);
SWTBotTree tree = webProjects.tree(... | public static String checkFileRenamingWithinWebProjects(SWTWorkbenchBot bot , String oldFileName, String newFileName,
String[] treePathItems , String fileTreeItemSuffix){
bot.sleep(sleepTime);
SWTBot webProjects = eclipse.showView(ViewType.WEB_PROJECTS);
SWTBotTree tree = webProjects.tree(... |
public void onClick(View target) {
if (target == mSelectButton && mActivity != null) {
if (hasCertificate()) {
// Handle the click on the button when it says "Remove"
setCertificate(null);
} else {
// We don't restrict the chooser for ... | public void onClick(View target) {
if (target == mSelectButton && mActivity != null) {
if (hasCertificate()) {
// Handle the click on the button when it says "Remove"
setCertificate(null);
} else {
// We don't restrict the chooser for ... |
public void addBody(Body body) throws SAXException, WingException,
UIException, SQLException, IOException, AuthorizeException
{
// Build the item viewer division.
Division feedback = body.addInteractiveDivision("feedback-form",
contextPath+"/feedback",Division.METHOD... | public void addBody(Body body) throws SAXException, WingException,
UIException, SQLException, IOException, AuthorizeException
{
// Build the item viewer division.
Division feedback = body.addInteractiveDivision("feedback-form",
contextPath+"/feedback",Division.METHOD... |
public void confirmDeleteBranchWithContent() {
PoulpeBranch selectedBranch = forumStructureVm.getSelectedItemInTree().getBranchItem();
try {
forumStructureService.removeBranch(selectedBranch);
} catch (NoConnectionToJcommuneException e) {
Messagebox.show(Labels.getLab... | public void confirmDeleteBranchWithContent() {
PoulpeBranch selectedBranch = forumStructureVm.getSelectedItemInTree().getBranchItem();
try {
forumStructureService.removeBranch(selectedBranch);
forumStructureVm.removeBranchFromTree(selectedBranch);
} catch (NoConnectio... |
protected void createAttributeLayout() {
String title = getTitleString();
String keywords = "";
String url = "";
// Attributes Composite- this holds all the combo fiels and text
// fields
Composite attributesComposite = new Composite(infoArea, SWT.NONE);
GridLayout attributesLayout = new GridLayout();... | protected void createAttributeLayout() {
String title = getTitleString();
String keywords = "";
String url = "";
// Attributes Composite- this holds all the combo fiels and text
// fields
Composite attributesComposite = new Composite(infoArea, SWT.NONE);
GridLayout attributesLayout = new GridLayout();... |
public List<Project> findAllProject() {
List<Project> result = null;
String idProject;
String vcCode;
String description;
final String query = "SELECT * FROM project ORDER BY idproject";
Connection connection = this.databaseSpring.connect();
try {
... | public List<Project> findAllProject() {
List<Project> result = null;
String idProject;
String vcCode;
String description;
final String query = "SELECT * FROM project ORDER BY idproject";
Connection connection = this.databaseSpring.connect();
try {
... |
public void execute() throws MojoExecutionException, MojoFailureException
{
netbeansUserdir.mkdirs();
List clusters = new ArrayList();
File[] fls = clusterBuildDir.listFiles();
for ( int i = 0; i < fls.length; i++ )
{
if ( fls[i].isDirectory() )
{... | public void execute() throws MojoExecutionException, MojoFailureException
{
netbeansUserdir.mkdirs();
List clusters = new ArrayList();
if (!clusterBuildDir.exists() || clusterBuildDir.listFiles() == null) {
throw new MojoExecutionException("No clusters to include in executio... |
public void run() {
Log.d("Start a test session.");
mNeedRestartAdbServer = false;
mResultObserver.setTestSessionLog(getSessionLog());
mResultObserver.start();
try {
if (mTest != null) {
TestPackage pkg = mTest.getT... | public void run() {
Log.d("Start a test session.");
mNeedRestartAdbServer = false;
mResultObserver.setTestSessionLog(getSessionLog());
mResultObserver.start();
try {
if (mTest != null) {
TestPackage pkg = mTest.getT... |
private ClassLoader createClassLoader(String name, ClassLoader parent)
throws Exception {
String value = CatalinaProperties.getProperty(name + ".loader");
if ((value == null) || (value.equals("")))
return parent;
ArrayList repositoryLocations = new ArrayList();
... | private ClassLoader createClassLoader(String name, ClassLoader parent)
throws Exception {
String value = CatalinaProperties.getProperty(name + ".loader");
if ((value == null) || (value.equals("")))
return parent;
ArrayList repositoryLocations = new ArrayList();
... |
public synchronized Component getComponent()
{
if (component == null)
{
component = new Canvas()
{
/**
* The indicator which determines whether the native counterpart
* of this <tt>JAWTRenderer</tt> wants <tt>paint</tt> ca... | public synchronized Component getComponent()
{
if (component == null)
{
component = new Canvas()
{
/**
* The indicator which determines whether the native counterpart
* of this <tt>JAWTRenderer</tt> wants <tt>paint</tt> ca... |
public static void main(String[] args) throws IOException {
Socket diagSocket = null;
PrintWriter out = null;
BufferedReader in = null;
final String host = "127.0.0.1";
final int port = 13500;
try {
diagSocket = new Socket(host, port);
out = new PrintWrite... | public static void main(String[] args) throws IOException {
Socket diagSocket = null;
PrintWriter out = null;
BufferedReader in = null;
final String host = "127.0.0.1";
final int port = 13500;
try {
diagSocket = new Socket(host, port);
diagSocket.setSoTimeout(0);... |
protected Boolean doInBackground(Void... params) {
// quick check for being able to write the GPX file
if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
return false;
}
Writer gpx = null;
try {
... | protected Boolean doInBackground(Void... params) {
// quick check for being able to write the GPX file
if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
return false;
}
Writer gpx = null;
try {
... |
public static String upload(String name, String description, File template)
{
try
{
FileStringReader reader = new FileStringReader(template);
String text = reader.read();
if(!Helper.isUtf8(text))
{
return "File must be in UTF 8.";... | public static String upload(String name, String description, File template)
{
try
{
FileStringReader reader = new FileStringReader(template);
String text = reader.read();
if(!Helper.isUtf8(text))
{
return "File must be in Plaintex... |
void performDecode(final DecodeTask task) {
if (executor.isTaskDead(task)) {
if (LCTX.isDebugEnabled()) {
LCTX.d("Task " + task.id + ": Skipping dead decode task for " + task.node);
}
return;
}
if (LCTX.isDebugEnabled()) {
LCTX... | void performDecode(final DecodeTask task) {
if (executor.isTaskDead(task)) {
if (LCTX.isDebugEnabled()) {
LCTX.d("Task " + task.id + ": Skipping dead decode task for " + task.node);
}
return;
}
if (LCTX.isDebugEnabled()) {
LCTX... |
public void writeTo(OutputStream outputStream) throws IOException {
outputStream.write(String.format(fileTpl, mBoundary, mField, mFilename, mContentType).getBytes());
outputStream.flush();
int blockSize = 256 * 1 << 10;
long index = 0;
long length = mIsa.length();
while(index < length) {
int re... | public void writeTo(OutputStream outputStream) throws IOException {
outputStream.write(String.format(fileTpl, mBoundary, mField, mFilename, mContentType).getBytes());
outputStream.flush();
int blockSize = 256 * 1024;
long index = 0;
long length = mIsa.length();
while (index < length) {
int read... |
public synchronized void paint(ZLPaintContext context) {
final FBReaderApp reader = myReader;
if (reader == null) {
return;
}
final BookModel model = reader.Model;
if (model == null) {
return;
}
//final ZLColor bgColor = getBackgroundColor();
// TODO: separate color option for footer ... | public synchronized void paint(ZLPaintContext context) {
final FBReaderApp reader = myReader;
if (reader == null) {
return;
}
final BookModel model = reader.Model;
if (model == null) {
return;
}
//final ZLColor bgColor = getBackgroundColor();
// TODO: separate color option for footer ... |
public static ReadablePeriod parsePeriodString(String periodStr) {
ReadablePeriod period;
char periodUnit = periodStr.charAt(periodStr.length() - 1);
if (periodUnit == 'n') {
return null;
}
int periodInt = Integer.parseInt(periodStr.substring(0,
periodStr.length() - 1));
switch (periodUnit) {
cas... | public static ReadablePeriod parsePeriodString(String periodStr) {
ReadablePeriod period;
char periodUnit = periodStr.charAt(periodStr.length() - 1);
if (periodStr.equals("null") || periodUnit == 'n') {
return null;
}
int periodInt = Integer.parseInt(periodStr.substring(0,
periodStr.length() - 1));
... |
public ComponentListConfig(Integer min, Integer max, List<String> initial, List<?> valid) {
this.min = min;
this.max = max;
if (initial != null) {
initialTypes.addAll(initial);
}
if (valid != null) {
for (Object obj : valid) {
ComponentConfig config = new ComponentConfig(obj);
validTypes.put(c... | public ComponentListConfig(Integer min, Integer max, List<String> initial, List<?> valid) {
this.min = min;
this.max = max;
if (initial != null) {
initialTypes.addAll(initial);
}
if (valid != null && !valid.isEmpty()) {
for (Object obj : valid) {
ComponentConfig config = new ComponentConfig(obj);
... |
public static Object run(String scriptFileName, Object[] args, ClassLoader classLoader, Object logger) throws IOException {
Object result;
Context cx = enterContext(classLoader);
try {
ScriptableObject scope = createScope(cx, logger);
Object bootFunc = Functions.loadScript(cx, scope, "gino/boo... | public static Object run(String scriptFileName, Object[] args, ClassLoader classLoader, Object logger) throws IOException {
Object result;
Context cx = enterContext(classLoader);
try {
ScriptableObject scope = createScope(cx, logger);
Object bootFunc = Functions.loadScript(cx, scope, "gino/boo... |
public FrameNode(
final int type,
final int nLocal,
final Object[] local,
final int nStack,
final Object[] stack)
{
super(-1);
this.type = type;
switch (type) {
case Opcodes.F_NEW:
case Opcodes.F_FULL:
this.l... | public FrameNode(
final int type,
final int nLocal,
final Object[] local,
final int nStack,
final Object[] stack)
{
super(-1);
this.type = type;
switch (type) {
case Opcodes.F_NEW:
case Opcodes.F_FULL:
this.l... |
public void sort() throws TimeoutException {
// Do nothing if the inventory is closed
// if (!mc.hrrentScreen instanceof GuiContainer)
// return;
long timer = System.nanoTime();
InvTweaksContainerManager globalContainer = new InvTweaksContainerManager(m... | public void sort() throws TimeoutException {
// Do nothing if the inventory is closed
// if (!mc.hrrentScreen instanceof GuiContainer)
// return;
long timer = System.nanoTime();
InvTweaksContainerManager globalContainer = new InvTweaksContainerManager(m... |
private void createFromTemplate()
{
OutputStream ostr = null;
try
{
InputStream istr = resourceClass.getResourceAsStream(templateName);
if (istr == null)
{
logger.log(Level.SEVERE, "Could not find template " + templateName);
return;
}
ostr = new FileOutputStream(configFile);
byte[] buf... | private void createFromTemplate()
{
OutputStream ostr = null;
try
{
InputStream istr = resourceClass.getResourceAsStream(templateName);
if (istr == null)
{
logger.log(Level.SEVERE, "Could not find template " + templateName);
return;
}
ostr = new FileOutputStream(configFile);
byte[] buf... |
public static boolean isHaszero(Type t, Context xc) {
TypeSystem ts = xc.typeSystem();
XLit zeroLit = null; // see Lit_c.constantValue() in its decendants
if (t.isBoolean()) {
zeroLit = XTerms.FALSE;
} else if (ts.isChar(t)) {
zeroLit = XTerms.ZERO_CHAR;
... | public static boolean isHaszero(Type t, Context xc) {
TypeSystem ts = xc.typeSystem();
XLit zeroLit = null; // see Lit_c.constantValue() in its decendants
if (t.isBoolean()) {
zeroLit = XTerms.FALSE;
} else if (ts.isChar(t)) {
zeroLit = XTerms.ZERO_CHAR;
... |
public void setStatsData(Resource statsDef, String statsContent, String year, String month, String day) throws GeoStoreException {
try {
Resource statsData = this.searchStatsData(statsDef.getName(), year, month, day);
if (statsData == null) {
LOGGER.info("No StatsDat... | public void setStatsData(Resource statsDef, String statsContent, String year, String month, String day) throws GeoStoreException {
try {
Resource statsData = this.searchStatsData(statsDef.getName(), year, month, day);
if (statsData == null) {
LOGGER.info("No StatsDat... |
public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
dB.report(scriptEntry, getName(),
(scriptEntry.hasObject("script") ? scriptEntry.getdObject("script").debug() : scriptEntry.getScript().debug())
+ (scriptEntry.hasObject("instant") ? scrip... | public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
dB.report(scriptEntry, getName(),
(scriptEntry.hasObject("script") ? scriptEntry.getdObject("script").debug() : scriptEntry.getScript().debug())
+ (scriptEntry.hasObject("instant") ? scrip... |
public void testIdentify() {
try {
long total = 0;
LanguageIdentifier idfr = LanguageIdentifier.getInstance();
BufferedReader in = new BufferedReader(new InputStreamReader(
this.getClass().getResourceAsStream("test-referencial.txt")));
... | public void testIdentify() {
try {
long total = 0;
LanguageIdentifier idfr = LanguageIdentifier.getInstance();
BufferedReader in = new BufferedReader(new InputStreamReader(
this.getClass().getResourceAsStream("test-referencial.txt")));
... |
public Model updateArtifact(final URI artifactUri, final URI versionUri, final Collection<URI> objectUris,
final InputStream inputStream, RDFFormat format, final UpdatePolicy updatePolicy,
final DanglingObjectPolicy danglingObjectAction, final DataReferenceVerificationPolicy fileReferenceAct... | public Model updateArtifact(final URI artifactUri, final URI versionUri, final Collection<URI> objectUris,
final InputStream inputStream, RDFFormat format, final UpdatePolicy updatePolicy,
final DanglingObjectPolicy danglingObjectAction, final DataReferenceVerificationPolicy fileReferenceAct... |
public Object postProcessAfterInitialization(final Object bean, String beanName) {
if (bean instanceof DataSource) {
final DataSource dataSource = (DataSource) bean;
JdbcWrapperHelper.registerSpringDataSource(beanName, dataSource);
return JdbcWrapper.SINGLETON.createDataSourceProxy(beanName, dataSource);
... | public Object postProcessAfterInitialization(final Object bean, final String beanName) {
if (bean instanceof DataSource) {
final DataSource dataSource = (DataSource) bean;
JdbcWrapperHelper.registerSpringDataSource(beanName, dataSource);
return JdbcWrapper.SINGLETON.createDataSourceProxy(beanName, dataSourc... |
public static void main(String[] args) throws Exception {
String user = args[0];
String password = args[1];
String oldMilestone = args[2];
String newMilestone = args[3];
String oldBuildNumber = args[4];
String newBuildNumber = args[5];
String buildVersion = a... | public static void main(String[] args) throws Exception {
String user = args[0];
String password = args[1];
String oldMilestone = args[2];
String newMilestone = args[3];
String oldBuildNumber = args[4];
String newBuildNumber = args[5];
String buildVersion = a... |
public IPeerModel validatePeerNodeForAdd(IPeerModel node) {
Assert.isNotNull(node);
Assert.isTrue(Protocol.isDispatchThread());
// Get the peer from the peer node
IPeer peer = node.getPeer();
IPeerModel result = node;
// Check on the filtered by preference settings what to do
boolean isFilterByAgentId... | public IPeerModel validatePeerNodeForAdd(IPeerModel node) {
Assert.isNotNull(node);
Assert.isTrue(Protocol.isDispatchThread());
// Get the peer from the peer node
IPeer peer = node.getPeer();
IPeerModel result = node;
// Check on the filtered by preference settings what to do
boolean isFilterByAgentId... |
private static GetRecordById parse202( Version version202, Map<String, String> normalizedKVPParams,
String defaultOutputFormat, String defaultOuputSchema ) {
// outputFormat (optional)
String outputFormat = KVPUtils.getDefault( normalizedKVPParams, "output... | private static GetRecordById parse202( Version version202, Map<String, String> normalizedKVPParams,
String defaultOutputFormat, String defaultOuputSchema ) {
// outputFormat (optional)
String outputFormat = KVPUtils.getDefault( normalizedKVPParams, "output... |
public void handle(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
String path = request.getRequestURI().substring(request.getContextPath().length());
int i = path.indexOf(';');
if (i > -1){
// strip jsessionid paramete... | public void handle(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
String path = request.getRequestURI().substring(request.getContextPath().length());
int i = path.indexOf(';');
if (i > -1){
// strip jsessionid paramete... |
public static String revertLRU(String lru) {
if(lru == null) {
return null;
}
lru = lru.trim();
if(StringUtils.isEmpty(lru)) {
return null;
}
String url = "";
Scanner scanner = new Scanner(lru);
scanner.useDelimiter("\\|");
... | public static String revertLRU(String lru) {
if(lru == null) {
return null;
}
lru = lru.trim();
if(StringUtils.isEmpty(lru)) {
return null;
}
String url = "";
Scanner scanner = new Scanner(lru);
scanner.useDelimiter("\\|");
... |
public void script(
@CliOption(key = { "", "file" }, help = "The file to locate and execute", mandatory = true) final File script,
@CliOption(key = "lineNumbers", mandatory = false, specifiedDefaultValue = "true", unspecifiedDefaultValue = "false", help = "Display line numbers when executing... | public void script(
@CliOption(key = { "", "file" }, help = "The file to locate and execute", mandatory = true) final File script,
@CliOption(key = "lineNumbers", mandatory = false, specifiedDefaultValue = "true", unspecifiedDefaultValue = "false", help = "Display line numbers when executing... |
public TestResult execute(TestSessionContext testSessionContext) {
try {
Runtime rt = Runtime.getRuntime();
Process process = rt.exec(command);
StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream(), StdType.ERROR);
StreamGobbler outputGobbl... | public TestResult execute(TestSessionContext testSessionContext) {
try {
Runtime rt = Runtime.getRuntime();
Process process = rt.exec(command);
StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream(), StdType.ERROR);
StreamGobbler outputGobbl... |
public ListModel(int itemsTotal, int pageSize, int currentPage) {
this.itemsTotal = itemsTotal;
this.pageSize = pageSize;
this.currentPage = currentPage;
pages = (int) itemsTotal / pageSize + 1;
if (itemsTotal % pageSize == 0) {
pages--;
}
}
| public ListModel(int itemsTotal, int pageSize, int currentPage) {
this.itemsTotal = itemsTotal;
this.pageSize = pageSize;
this.currentPage = currentPage;
if (pageSize > 0) {
pages = (int) itemsTotal / pageSize + 1;
if (itemsTotal % pageSize == 0) {
pages--;
}
}
}
|
public void onEntityJoinWorld(EntityJoinWorldEvent ev) {
if (!ready || isClient) return;
if (ev.entity instanceof EntityLiving && !(ev.entity instanceof EntityPlayer)) {// || ev.entity instanceof EntityPlayerMP) {
ev.setCanceled(BukkitEventRouters.Entity.CreatureSpawn.callEvent(ev.isCanceled(), ToBukkitEvent.... | public void onEntityJoinWorld(EntityJoinWorldEvent ev) {
if (!ready || isClient) return;
if (ev.entity instanceof EntityLiving && !(ev.entity instanceof EntityPlayer)) {// || ev.entity instanceof EntityPlayerMP) {
ev.setCanceled(BukkitEventRouters.Entity.CreatureSpawn.callEvent(ev.isCanceled(), ToBukkitEvent.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.