buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void visitInvokeInstruction(InvokeInstruction o){ indexValid(o, o.getIndex()); if ( (o instanceof INVOKEVIRTUAL) || (o instanceof INVOKESPECIAL) || (o instanceof INVOKESTATIC) ){ Constant c = cpg.getConstant(o.getIndex()); if (! (c instanceof ConstantMethodref)){ constraintViolat...
public void visitInvokeInstruction(InvokeInstruction o){ indexValid(o, o.getIndex()); if ( (o instanceof INVOKEVIRTUAL) || (o instanceof INVOKESPECIAL) || (o instanceof INVOKESTATIC) ){ Constant c = cpg.getConstant(o.getIndex()); if (! (c instanceof ConstantMethodref)){ constraintViolat...
public static void execute() { LocalStorageService storageService = LocalStorageService.getInstance(); Date startDate = TimesheetApp.startDate; Date shutdownDate = TimesheetApp.shutDownDate; Date lastDate = storageService.getLastTaskEntryDate(); if (lastDate == null) lastDate = BusinessDayUtil.getPr...
public static void execute() { LocalStorageService storageService = LocalStorageService.getInstance(); Date startDate = TimesheetApp.startDate; Date shutdownDate = TimesheetApp.shutDownDate; Date lastDate = storageService.getLastTaskEntryDate(); if (lastDate == null) lastDate = BusinessDayUtil.getPr...
public Iterator getParentAxisIterator(Object contextNode) { Object parent = null; if ( contextNode instanceof Document ) { parent = contextNode; } else if ( contextNode instanceof Element ) { parent = ((Element)contextNode).getParent(); ...
public Iterator getParentAxisIterator(Object contextNode) { Object parent = null; if ( contextNode instanceof Document ) { parent = contextNode; } else if ( contextNode instanceof Element ) { parent = ((Element)contextNode).getParent(); ...
private void encodeXML( ResponseWriter writer, String value ) throws IOException { int depth = 0; try { XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader( new StringReader( value ) ); boolean lastWasEndElement = false; ...
private void encodeXML( ResponseWriter writer, String value ) throws IOException { int depth = 0; try { XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader( new StringReader( value ) ); boolean lastWasEndElement = false; ...
public static void writeJs( String js, Config config, HttpExchange exchange) throws IOException { Headers responseHeaders = exchange.getResponseHeaders(); responseHeaders.set("Content-Type", config.getJsContentType()); int responseLength = js.getBytes(Settings.CHARSET).length; exchange.sendRes...
public static void writeJs( String js, Config config, HttpExchange exchange) throws IOException { Headers responseHeaders = exchange.getResponseHeaders(); responseHeaders.set("Content-Type", config.getJsContentType()); int responseLength = js.getBytes(config.getOutputCharset()).length; exchang...
public boolean isEmpty() { for(int i = 0; i < problems.length; i++) { if(!problems[i].isEmpty()) return false; } return false; }
public boolean isEmpty() { for(int i = 0; i < problems.length; i++) { if(!problems[i].isEmpty()) return false; } return true; }
public static void main(String [] args) { try { SymbolList res = Tools.createSymbolList(10); final int trials = 10; System.out.println("Starting with:\n" + res.seqString()); GappedSymbolList gl = new GappedSymbolList(res); System.out.println("Gapped version:\n" + gl.seqString()); gl.d...
public static void main(String [] args) { try { SymbolList res = Tools.createSymbolList(10); final int trials = 10; System.out.println("Starting with:\n" + res.seqString()); SimpleGappedSymbolList gl = new SimpleGappedSymbolList(res); System.out.println("Gapped version:\n" + gl.seqString(...
private Dialog buildDialog(Context context, Task task) { UserInterface userInterface = task.getUser(); AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); Dialog dialog = dialogBuilder.show(); dialog.setContentView(R.layout.dialog_help_er_in_range); // dialog.setCanceledOnTouchOutside(false...
private Dialog buildDialog(Context context, Task task) { UserInterface userInterface = task.getUser(); AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); Dialog dialog = dialogBuilder.show(); dialog.setContentView(R.layout.dialog_help_er_in_range); dialog.setCanceledOnTouchOutside(false);...
protected void createContents() { /* * Definitions */ // Shell this.shell = new Shell(this.getParent(), SWT.DIALOG_TRIM); shell.setLayout(new FormLayout()); // Elements TabFolder tabFolder = new TabFolder(shell, SWT.NONE); FormData fd_tabFolder = new FormData(); fd_tabFolder.left = new FormAttac...
protected void createContents() { /* * Definitions */ // Shell this.shell = new Shell(this.getParent(), SWT.DIALOG_TRIM); shell.setLayout(new FormLayout()); // Elements TabFolder tabFolder = new TabFolder(shell, SWT.NONE); FormData fd_tabFolder = new FormData(); fd_tabFolder.left = new FormAttac...
Symbol findVar(JavafxEnv<JavafxAttrContext> env, Name name, int kind, Type expected) { Symbol bestSoFar = varNotFound; Symbol sym; JavafxEnv<JavafxAttrContext> env1 = env; boolean staticOnly = false; boolean innerAccess = false; Type mtype = expected; if (mtyp...
Symbol findVar(JavafxEnv<JavafxAttrContext> env, Name name, int kind, Type expected) { Symbol bestSoFar = varNotFound; Symbol sym; JavafxEnv<JavafxAttrContext> env1 = env; boolean staticOnly = false; boolean innerAccess = false; Type mtype = expected; if (mtyp...
private void createSelectedTest(Test test) { this.selectedTest = new Test(); this.selectedTest.setCreator(test.getCreator()); this.selectedTest.setId(test.getId()); this.selectedTest.setInstructions(test.getInstructions()); //copy sections of the test to the student ...
private void createSelectedTest(Test test) { this.selectedTest = new Test(); this.selectedTest.setCreator(test.getCreator()); this.selectedTest.setId(test.getId()); this.selectedTest.setName(test.getName()); this.selectedTest.setInstructions(test.getInstructions()); ...
private static Properties properties() { if (properties==null) { properties = new Properties(); InputStream stream = null; try { stream = new FileInputStream(PROPERTIES_PATH); properties.load(stream); stream.close(); } catch (Exception e) { ...
private static Properties properties() { if (properties==null) { properties = new Properties(); InputStream stream = null; try { stream = new FileInputStream(PROPERTIES_PATH); properties.load(stream); stream.close(); } catch (Exception e) { ...
public static void main(String[] args) throws SigarException, UnknownHostException { // try (FileOutputStream fileOutputStream = new FileOutputStream("d:\\workfolder\\TestCar.obj"); // ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream)) { // Car car = new ...
public static void main(String[] args) throws SigarException, UnknownHostException { // try (FileOutputStream fileOutputStream = new FileOutputStream("d:\\workfolder\\TestCar.obj"); // ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream)) { // Car car = new ...
public void enrichIfConditionsMet(final CacheKey key) { synchronized(cache) { if(state == PendingEnrichmentState.IN_PROGRESS || state == PendingEnrichmentState.BROKEN_DEPENDENCY) { throw new IllegalStateException("" + state); } if(cancelled) { return; } ...
public void enrichIfConditionsMet(final CacheKey key) { synchronized(cache) { if(state == PendingEnrichmentState.IN_PROGRESS || state == PendingEnrichmentState.BROKEN_DEPENDENCY) { throw new IllegalStateException("" + state); } if(cancelled) { return; } ...
protected <T> T getResponse(String url, CAPConstants.CapResource resource) throws IOException { HttpGet get = new HttpGet(url); get.setHeader("Accept", resource.getMimeType()); get.setHeader(CAPConstants.CAP_APIKEY_HEADER, CAPConstants.getApiKey()); HttpResponse response; try...
protected <T> T getResponse(String url, CAPConstants.CapResource resource) throws IOException { HttpGet get = new HttpGet(url); get.setHeader("Accept", resource.getMimeType()); get.setHeader(CAPConstants.CAP_APIKEY_HEADER, CAPConstants.getApiKey()); HttpResponse response; try...
private void processXML(final String result, final File file, final int index, final StringBuilder log) { try { String fixedResult = result; /* remove utf-8 BOM marker (if present) */ if (fixedResult.startsWith("")) fixedResult = fixedResult.replaceFirst("", ""); /* parse the XML doc...
private void processXML(final String result, final File file, final int index, final StringBuilder log) { try { String fixedResult = result; /* remove utf-8 Byte Order Mark (BOM) if present */ if (fixedResult.startsWith("")) fixedResult = fixedResult.replaceFirst("", ""); /* parse th...
public void testLayers( String service ) throws MojoFailureException { if ( !service.equals( "WMS" ) ) { return; } String address = createBaseURL() + "services?request=GetCapabilities&version=1.1.1&service=" + service; String currentLayer = nul...
public void testLayers( String service ) throws MojoFailureException { if ( !service.equals( "WMS" ) ) { return; } String address = createBaseURL() + "services/wms?request=GetCapabilities&version=1.1.1&service=" + service; String currentLayer =...
public JavaSourceAnalysisScope() { EclipseProjectPath.SOURCE_REF.setParent(getLoader(APPLICATION)); getLoader(SYNTHETIC).setParent(EclipseProjectPath.SOURCE_REF); loadersByName.put(EclipseProjectPath.SOURCE, EclipseProjectPath.SOURCE_REF); setLoaderImpl(getLoader(SYNTHETIC), "com.ibm.wala.ipa.summar...
public JavaSourceAnalysisScope() { EclipseProjectPath.SOURCE_REF.setParent(getLoader(APPLICATION)); getLoader(SYNTHETIC).setParent(EclipseProjectPath.SOURCE_REF); loadersByName.put(EclipseProjectPath.SOURCE, EclipseProjectPath.SOURCE_REF); setLoaderImpl(getLoader(SYNTHETIC), "com.ibm.wala.ipa.summar...
public void perform() { String warpname = this.argAsString(0); String setPassword = null; if(this.argAsString(1) != null) { setPassword = this.argAsString(1); } else { setPassword = "nullvalue"; } if(!FactionsPlus.permission.has(sender, "factionsplus.warp")) { sender.sendMessage(ChatColor.RED + ...
public void perform() { String warpname = this.argAsString(0); String setPassword = null; if(this.argAsString(1) != null) { setPassword = this.argAsString(1); } else { setPassword = "nullvalue"; } if(!FactionsPlus.permission.has(sender, "factionsplus.warp")) { sender.sendMessage(ChatColor.RED + ...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActivityHelper.debugSetWindowFlags(this); setContentView(R.layout.account_setup_options); mCheckFrequencyView = (Spinner) UiUtilities.getView(this, R.id.account_check_frequency); mSyncWindo...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActivityHelper.debugSetWindowFlags(this); setContentView(R.layout.account_setup_options); mCheckFrequencyView = (Spinner) UiUtilities.getView(this, R.id.account_check_frequency); mSyncWindo...
private void registerListeners(final Composite parent) { /** * Ideally not required. However the table viewer is not getting laid out properly on performing * "maximize + restore" So this is a hack to make sure that the table is laid out again on re-size of the window */ addPaintListener(new PaintListener...
private void registerListeners(final Composite parent) { /** * Ideally not required. However the table viewer is not getting laid out properly on performing * "maximize + restore" So this is a hack to make sure that the table is laid out again on re-size of the window */ addPaintListener(new PaintListener...
public <G1, G2> IncidentGraphElementIterator( GraphElement<G1, G2> graphElement, Class<? extends GraphElement<G1, G2>> gc, Direction dir) { this.graphElement = graphElement; this.gc = gc; this.dir = dir; incidenceListVersion = ((GraphElementImpl<G1, G2>) graphElement) .getIncidenceListVersion...
public IncidentGraphElementIterator(GraphElement<?, ?> graphElement, Class<? extends GraphElement<?, ?>> gc, Direction dir) { this.graphElement = graphElement; this.gc = gc; this.dir = dir; incidenceListVersion = ((GraphElementImpl<?, ?>) graphElement) .getIncidenceListVersion(); current = gra...
protected void copyCommonTagFields(Tag tag, Track track) throws IOException { TrackData trackData = track.getTrackData(); if (tag != null && track != null) { for (TagFieldKey key : TagFieldKey.values()) { List<TagField> fields; try { fields = tag.get(key); } ca...
protected void copyCommonTagFields(Tag tag, Track track) throws IOException { TrackData trackData = track.getTrackData(); if (tag != null && track != null) { for (TagFieldKey key : TagFieldKey.values()) { List<TagField> fields; try { fields = tag.get(key); } ca...
public static int largest(int[] list) { int index, max=Integer.MAX_VALUE; if (list.length == 0) { throw new RuntimeException("Empty list"); } for (index = 0; index < list.length-1; index++) { if (list[index] > max) { max = list[index]; ...
public static int largest(int[] list) { int index, max=0; if (list.length == 0) { throw new RuntimeException("Empty list"); } for (index = 0; index < list.length; index++) { if (list[index] > max) { max = list[index]; } }...
public <Psi extends PsiElement> void process(@NotNull PsiClass psiClass, @NotNull PsiMethod[] classMethods, @NotNull PsiAnnotation psiAnnotation, @NotNull List<Psi> target) { if (!hasFieldByName(psiClass, loggerName)) { Project project = psiClass.getProject(); PsiManager manager = psiClass.getContaini...
public <Psi extends PsiElement> void process(@NotNull PsiClass psiClass, @NotNull PsiMethod[] classMethods, @NotNull PsiAnnotation psiAnnotation, @NotNull List<Psi> target) { if (psiClass.isInterface() || psiClass.isAnnotationType()) { //TODO create warning in code //Logger Injection is not possible o...
private static TemporalAccessor adjust(final TemporalAccessor temporal, DateTimeFormatter formatter) { // normal case first Chronology overrideChrono = formatter.getChronology(); ZoneId overrideZone = formatter.getZone(); if (overrideChrono == null && overrideZone == null) { ...
private static TemporalAccessor adjust(final TemporalAccessor temporal, DateTimeFormatter formatter) { // normal case first Chronology overrideChrono = formatter.getChronology(); ZoneId overrideZone = formatter.getZone(); if (overrideChrono == null && overrideZone == null) { ...
private JSObject buildExports(ExecutionContext context, String moduleName, Object javaModule) throws IllegalAccessException { Method[] methods = javaModule.getClass().getMethods(); JSObject module = (JSObject) context.getGlobalObject().get("module"); JSObject exports = (JSObject) module.ge...
private JSObject buildExports(ExecutionContext context, String moduleName, Object javaModule) throws IllegalAccessException { Method[] methods = javaModule.getClass().getMethods(); JSObject module = (JSObject) context.getVariableEnvironment().getRecord().getBindingValue(context, "module", true); JSObje...
public void onEnable() { try { PluginDescriptionFile pdf = getDescription(); pluginManager = getServer().getPluginManager(); requiredPlugins = getConfig().getList("required_plugins", new ArrayList<String>()); debug = getConfig().getBoolean("debug", false); ...
public void onEnable() { try { PluginDescriptionFile pdf = getDescription(); pluginManager = getServer().getPluginManager(); requiredPlugins = getConfig().getStringList("required_plugins"); debug = getConfig().getBoolean("debug"); HashMap<Listen...
public AccessCodeEntry createAccessCode(String scopeParam, String state, String redirect, RealmModel realm, UserModel client, UserModel user) { boolean applicationResource = realm.hasRole(client, realm.getRole(Constants.APPLICATION_ROLE)); AccessCodeEntry code = new AccessCodeEntry(); Skele...
public AccessCodeEntry createAccessCode(String scopeParam, String state, String redirect, RealmModel realm, UserModel client, UserModel user) { boolean applicationResource = realm.hasRole(client, realm.getRole(Constants.APPLICATION_ROLE)); AccessCodeEntry code = new AccessCodeEntry(); Skele...
public void run() { logger.info("Forcing the end of all activities for ra entity "+ raEntity.getName()); // first round, end all activities gracefully boolean noActivitiesFound = true; for (ActivityContextHandle handle : sleeContainer .getActivityContextFactory() .getAllActivityContextsHandles()) { ...
public void run() { logger.info("Forcing the end of all activities for ra entity "+ raEntity.getName()); // first round, end all activities gracefully boolean noActivitiesFound = true; for (ActivityContextHandle handle : sleeContainer .getActivityContextFactory() .getAllActivityContextsHandles()) { ...
public void run() { String line; StringTokenizer tokens; try { ExchangeSession.checkConfig(); sendClient("220 DavMail SMTP ready at " + new Date()); for (; ;) { line = readClient(); // unable to read line, connection closed...
public void run() { String line; StringTokenizer tokens; try { ExchangeSession.checkConfig(); sendClient("220 DavMail SMTP ready at " + new Date()); for (; ;) { line = readClient(); // unable to read line, connection closed...
void hideNavScreen(boolean animate) { if (mNavScreen == null) return; final Tab tab = mNavScreen.getSelectedTab(); if ((tab == null) || !animate) { mContentView.setVisibility(View.VISIBLE); finishAnimateOut(); return; } NavTabView tabview =...
void hideNavScreen(boolean animate) { if (mNavScreen == null) return; final Tab tab = mNavScreen.getSelectedTab(); if ((tab == null) || !animate) { if (tab != null) { setActiveTab(tab); } else if (mTabControl.getTabCount() > 0) { // use...
public void onEntityDamage(EntityDamageEvent event) { String sourcename = ""; Entity source = null; Player player = null; Entity target = event.getEntity(); if (event.getCause() == DamageCause.FALL) { if (target instanceof Player) { PassiveAbility.trigger((Player)target, event); } } else if...
public void onEntityDamage(EntityDamageEvent event) { String sourcename = ""; Entity source = null; Player player = null; Entity target = event.getEntity(); if (event.getCause() == DamageCause.FALL) { if (target instanceof Player) { PassiveAbility.trigger((Player)target, event); } } else if...
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { Context cx = ContextFactory.getGlobal().enterContext(); Session session; if((session = (Session)request.getSession().getAttribute("latte.session")) == null) { session = new Sessi...
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { Context cx = ContextFactory.getGlobal().enterContext(); Session session; if((session = (Session)request.getSession().getAttribute("latte.session")) == null) { session = new Sessi...
public List<Post> getPostListFromMobile(Subject subject, ArrayList<String> blackList, int boardType) { String url = ""; int currentPageNo = subject.getCurrentPageNo(); boolean isInSubject = false; if (boardType == SubjectListFragment.BOARD_TYPE_SUBJECT) { url = "http://m.newsmth.net/article/" + subject.g...
public List<Post> getPostListFromMobile(Subject subject, ArrayList<String> blackList, int boardType) { String url = ""; int currentPageNo = subject.getCurrentPageNo(); boolean isInSubject = false; if (boardType == SubjectListFragment.BOARD_TYPE_SUBJECT) { url = "http://m.newsmth.net/article/" + subject.g...
private void create() { JMenu rendererMenu = new JMenu("Renderer"); JMenuItem spriteRendererMenuItem = rendererMenu.add("SpriteAnimatedRenderer"); JMenuItem tileMapRendererMenuItem = rendererMenu.add("TileMapRenderer"); JMenu audioMenu = new JMenu("Audio"); JMenuItem musicSo...
private void create() { JMenu rendererMenu = new JMenu("Renderer"); JMenuItem spriteRendererMenuItem = rendererMenu.add("SpriteRenderer"); JMenuItem tileMapRendererMenuItem = rendererMenu.add("TileMapRenderer"); JMenu audioMenu = new JMenu("Audio"); JMenuItem musicSourceMenu...
public boolean isDateValid() { Date sd = getStartDate(); Date ed = getEndDate(); // if no dates set, return true (most common case) if ((sd == null) && (ed == null)) { return true; } // one is set, now need to do some date math Date n...
public boolean isDateValid() { Date sd = getStartDate(); Date ed = getEndDate(); // if no dates set, return true (most common case) if ((sd == null) && (ed == null)) { return true; } // one is set, now need to do some date math Date n...
public static String getHTML() throws Exception{ //Log in long start = System.currentTimeMillis(); out.println("Logging in..."); String password = "Cocacola1"; Response res = J...
public static String getHTML() throws Exception{ //Log in long start = System.currentTimeMillis(); out.println("Logging in..."); String username = ""; String password = ""; Response res = Jsoup .connect("https://gradespeed.kleinisd.net/pc/Default....
public static void main(String[] args) { if (args.length != 1) { System.out .println("Please provide only one parameter - a suitable property file"); return; } Sensor sensor = null; try { sensor = SensorUtility.getSensorInstance(args[0]); } catch (NodeInitializationException e) { System.o...
public static void main(String[] args) { if (args.length != 1) { System.out .println("Please provide only one parameter - a suitable property file"); return; } Sensor sensor = null; try { sensor = SensorUtility.getSensorInstance(args[0]); } catch (NodeInitializationException e) { System.o...
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { log.info("場所(Locale):" + Locale.getDefault()); GregorianCalendar cal = new GregorianCalendar(); Date now = cal.getTime(); log.info("[" + now + ":" + format.format(now) + "]"); PersistenceManager pm = PMF.get().getPer...
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { log.info("場所(Locale):" + Locale.getDefault()); GregorianCalendar cal = new GregorianCalendar(); Date now = cal.getTime(); log.info("[" + now + ":" + format.format(now) + "]"); PersistenceManager pm = PMF.get().getPer...
public Object execute(ExecutionEvent event) { final IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event); if (!selection.isEmpty()) { IR4EUIModelElement element = null; MessageDialogWithToggle dialog = null; for (final Iterator<?> iterator = selection.iterator();...
public Object execute(ExecutionEvent event) { final IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event); if (!selection.isEmpty()) { IR4EUIModelElement element = null; MessageDialogWithToggle dialog = null; for (final Iterator<?> iterator = selection.iterator();...
public void initialize() { int foreignGold = 0; Element report = getCanvas().getClient().getInGameController().getForeignAffairsReport(); int number = report.getChildNodes().getLength(); for (int i = 0; i < number; i++) { Element enemyElement = (Element) report.getChildN...
public void initialize() { int foreignGold = 0; Element report = getCanvas().getClient().getInGameController().getForeignAffairsReport(); int number = report.getChildNodes().getLength(); for (int i = 0; i < number; i++) { Element enemyElement = (Element) report.getChildN...
public ICurrentlyPlaying getCurrentlyPlaying(INotifiableManager manager) { final IControlClient.ICurrentlyPlaying nothingPlaying = new IControlClient.ICurrentlyPlaying() { private static final long serialVersionUID = -1554068775915058884L; public boolean isPlaying() { return false; } public int getMediaT...
public ICurrentlyPlaying getCurrentlyPlaying(INotifiableManager manager) { final IControlClient.ICurrentlyPlaying nothingPlaying = new IControlClient.ICurrentlyPlaying() { private static final long serialVersionUID = -1554068775915058884L; public boolean isPlaying() { return false; } public int getMediaT...
void loadTiles() { // Reset reference tiles mIMETile = null; // Filter items not compatible with device boolean bluetoothSupported = deviceSupportsBluetooth(); boolean telephonySupported = deviceSupportsTelephony(mContext); if (!bluetoothSupported) { TIL...
void loadTiles() { // Reset reference tiles mIMETile = null; // Filter items not compatible with device boolean bluetoothSupported = deviceSupportsBluetooth(); boolean telephonySupported = deviceSupportsTelephony(mContext); if (!bluetoothSupported) { TIL...
public SaxParserConsumer( ResultSet rs, RelationInformation rinfo, XMLDataInputStream is, String tName ) throws OdaException { super( rs, rinfo, is, tName ); }
public SaxParserConsumer( ResultSet rs, RelationInformation rinfo, XMLDataInputStream is, String tName ) throws OdaException { super( rinfo, is, tName ); }
public EditorView(final ViewNotifier man) { super(EDITORVIEW, man); border(5).layout(new BorderLayout()); label = new BaseXLabel(EDITOR, true, false); label.setForeground(GUIConstants.GRAY); final BaseXButton openB = BaseXButton.command(GUICommands.C_EDITOPEN, gui); final BaseXButton saveB =...
public EditorView(final ViewNotifier man) { super(EDITORVIEW, man); border(5).layout(new BorderLayout()); label = new BaseXLabel(EDITOR, true, false); label.setForeground(GUIConstants.GRAY); final BaseXButton openB = BaseXButton.command(GUICommands.C_EDITOPEN, gui); final BaseXButton saveB =...
public void onEnable() { // TODO Auto-generated method stub PluginManager pm = getServer().getPluginManager(); pm.registerEvent(Event.Type.PLAYER_LOGIN, plistener, null, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_QUIT, plistener, null, Priority.Normal, this); log.info("[BFPlugin] Battlefield ...
public void onEnable() { // TODO Auto-generated method stub PluginManager pm = getServer().getPluginManager(); pm.registerEvent(Event.Type.PLAYER_LOGIN, plistener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_QUIT, plistener, Priority.Normal, this); getCommand("bf").setExecutor(new BFCMDEXE());...
public VCFVariant filter(VCFVariant element) { // FIXME - have option to only return variants with at least one MV double [][] logLikelihoods = element.getGenotypeLikelihoods(); if (null == logLikelihoods) return element; // no likelihood info, just pass on through. FIXME-- decide whether to pass or fail TRIO:...
public VCFVariant filter(VCFVariant element) { // FIXME - have option to only return variants with at least one MV double [][] logLikelihoods = element.getGenotypeLikelihoods(); if (null == logLikelihoods) return element; // no likelihood info, just pass on through. FIXME-- decide whether to pass or fail TRIO:...
private static boolean indexMatches(IndexesXml.Index index, Query query) { if (!index.getKind().equals(query.getKind())) { return false; } Set<String> filterProperties = getFilterProperties(query); Set<String> sortProperties = getSortProperties(query); Set<String...
private static boolean indexMatches(IndexesXml.Index index, Query query) { if (!index.getKind().equals(query.getKind())) { return false; } Set<String> filterProperties = getFilterProperties(query); Set<String> sortProperties = getSortProperties(query); Set<String...
public boolean visit(Type t) { switch (t.getKind()) { case BOOLEAN: out.print("false"); break; case DDL: case ENUM: case EXTERNAL: out.format("\"%s\"", t.getName()); break; case DOUBLE: out.print("0.0"); break;...
public boolean visit(Type t) { switch (t.getKind()) { case BOOLEAN: out.print("false"); break; case DDL: case ENUM: case EXTERNAL: out.format("\"%s\"", t.getName()); break; case DOUBLE: out.print("0.0"); break;...
public void writeStatusWebsite() { /* If we don't have any consensus, we cannot write useful consensus * health information to the website. Do not overwrite existing page * with a warning, because we might just not have learned about a new * consensus in this execution. */ if (this.mostRecentC...
public void writeStatusWebsite() { /* If we don't have any consensus, we cannot write useful consensus * health information to the website. Do not overwrite existing page * with a warning, because we might just not have learned about a new * consensus in this execution. */ if (this.mostRecentC...
public List<WorldGroup> getWorldGroups() { if (!this.getConfig().contains("groups")) { return null; } ConfigurationSection groupsSection = this.getConfig().getConfigurationSection("groups"); Set<String> groupNames = groupsSection.getKeys(false); List<WorldGroup> w...
public List<WorldGroup> getWorldGroups() { ConfigurationSection groupsSection = this.getConfig().getConfigurationSection("groups"); if (groupsSection == null) { return null; } Set<String> groupNames = groupsSection.getKeys(false); List<WorldGroup> worldGroups = ne...
public void process(HttpRequest request, HttpContext context) throws HttpException, IOException { String authorizationheader = null; if (oaHandler != null) { if (oaHandler.getClass().equals(HMACOAuth1Handler.class)) { String requestUri = request.getRequestLine().getUri().toString(); // Using UrlU...
public void process(HttpRequest request, HttpContext context) throws HttpException, IOException { String authorizationheader = null; if (oaHandler != null) { if (oaHandler.getClass().equals(HMACOAuth1Handler.class)) { String requestUri = request.getRequestLine().getUri().toString(); // Using UrlU...
public void handlePhoneOffHook(HomeAloneService s) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(s); if(!PrefUtils.getBoolPreference(prefs, R.string.skip_handled_key, s)) return; Cursor c = DroidContentProviderClient.getAllCall(s); if (c.moveToFirst()) { do{ ...
public void handlePhoneOffHook(HomeAloneService s) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(s); if(!PrefUtils.getBoolPreference(prefs, R.string.skip_handled_key, s)) return; Cursor c = DroidContentProviderClient.getAllCall(s); if (c.moveToFirst()) { do{ ...
private void setTemporaryClosedDate() { Calendar tempDate = Calendar.getInstance(); tempDate.clear(); tempDate.set(Calendar.YEAR, 9998); tempDate.set(Calendar.MONTH, 12); tempDate.set(Calendar.DAY_OF_MONTH, 31); this.suletud = tempDate; }
private void setTemporaryClosedDate() { Calendar tempDate = Calendar.getInstance(); tempDate.clear(); tempDate.set(Calendar.YEAR, 9999); tempDate.set(Calendar.MONTH, Calendar.DECEMBER); tempDate.set(Calendar.DAY_OF_MONTH, 31); this.suletud = tempDate; }
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder(); queryBuilder.setTables(DatabaseHelper.VFS_DATABASE_TABLE); int uriType = sURIMatcher.match(uri); switch (uriType) { case VFS_ID: qu...
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder(); queryBuilder.setTables(DatabaseHelper.VFS_DATABASE_TABLE); int uriType = sURIMatcher.match(uri); switch (uriType) { case VFS_ID: qu...
public void run(String arg) { if (!ImageCheck.checkEnvironment()) return; ImagePlus imp = IJ.getImage(); if (null == imp) { IJ.noImage(); return; } int threshold = 128; ImageCheck ic = new ImageCheck(); if (ic.isBinary(imp)) { threshold = 128; } else if (imp.getBitDepth() == 8) { Thresho...
public void run(String arg) { if (!ImageCheck.checkEnvironment()) return; ImagePlus imp = IJ.getImage(); if (null == imp) { IJ.noImage(); return; } int threshold = 128; ImageCheck ic = new ImageCheck(); if (ic.isBinary(imp)) { threshold = 128; } else if (imp.getBitDepth() == 8) { Thresho...
public static void main(String[] args) { // Build a single contact Contact james = new ContactBuilder() .withName("James Bond") .withEmail("007@secretservice.org") .build(); // Build 100 contacts with one of the given names and no email Contact[] someContacts = new ContactBuilder() .withNameFrom...
public static void main(String[] args) { // Build a single contact Contact james = new ContactBuilder() .withName("James Bond") .withEmail("007@secretservice.org") .build(); // Build 100 contacts each with one of the given names and no email Contact[] someContacts = new ContactBuilder() .withNam...
private void analyzeTextForGeoInfo() throws XMLStreamException { // fast precheck if(title.toString().endsWith("/doc") || title.toString().startsWith("Шаблон:")) { // Looks as template article no information in it return; } int ls = text.indexOf("lat_dir"); if(ls != -1 && text.charAt(ls + 1 + "...
private void analyzeTextForGeoInfo() throws XMLStreamException { // fast precheck if(title.toString().endsWith("/doc") || title.toString().startsWith("Шаблон:")) { // Looks as template article no information in it return; } int ls = text.indexOf("lat_dir"); if(ls != -1 && text.charAt(ls + 1 + "...
public static void main(String[] args) { Settings settings = parseCliArgs(args); if (settings == null) { // cannot go on like that. no settings! HelpFormatter formatter = new HelpFormatter(); formatter.setWidth(160); // aaargh, cannot print on stderr... formatter.printHelp("gis.jar", buildCliOption...
public static void main(String[] args) { Settings settings = parseCliArgs(args); if (settings == null) { // cannot go on like that. no settings! HelpFormatter formatter = new HelpFormatter(); formatter.setWidth(160); // aaargh, cannot print on stderr... formatter.printHelp("gis.jar", buildCliOption...
private WorkUnit lockNThreadsTask(final AtomicInteger lock, final int n) { return new WorkUnit() { @Override public void doJob(AmazonS3 s3) { synchronized (lock) { System.out.println(lock); if(lock.incrementAndGet() < n) { try { lock.wait(); } catch (InterruptedException e) { ...
private WorkUnit lockNThreadsTask(final AtomicInteger lock, final int n) { return new WorkUnit() { @Override public void doJob(AmazonS3 s3) { synchronized (lock) { if(lock.incrementAndGet() < n) { try { lock.wait(); } catch (InterruptedException e) { Fail.fail("Should not get...
private void complete(ClassOrInterface klass, ClassMirror classMirror) { Map<MethodMirror, List<MethodMirror>> variables = new HashMap<MethodMirror, List<MethodMirror>>(); String qualifiedName = classMirror.getQualifiedName(); boolean isJava = qualifiedName.startsWith("java."); boole...
private void complete(ClassOrInterface klass, ClassMirror classMirror) { Map<MethodMirror, List<MethodMirror>> variables = new HashMap<MethodMirror, List<MethodMirror>>(); String qualifiedName = classMirror.getQualifiedName(); boolean isJava = qualifiedName.startsWith("java."); boole...
public static boolean initEGL(int majorVersion, int minorVersion) { if (SDLActivity.mSingleton.mEGLDisplay == null) { //Log.v("SDL", "Starting up OpenGL ES " + majorVersion + "." + minorVersion); try { EGL10 egl = (EGL10)EGLContext.getEGL(); EGLDisp...
public static boolean initEGL(int majorVersion, int minorVersion) { if (SDLActivity.mSingleton.mEGLDisplay == null) { //Log.v("SDL", "Starting up OpenGL ES " + majorVersion + "." + minorVersion); try { EGL10 egl = (EGL10)EGLContext.getEGL(); EGLDisp...
public Explanation explain(IndexReader reader, int doc) throws IOException { final int minShouldMatch = BooleanQuery.this.getMinimumNumberShouldMatch(); ComplexExplanation sumExpl = new ComplexExplanation(); sumExpl.setDescription("sum of:"); int coord = 0; float sum = 0....
public Explanation explain(IndexReader reader, int doc) throws IOException { final int minShouldMatch = BooleanQuery.this.getMinimumNumberShouldMatch(); ComplexExplanation sumExpl = new ComplexExplanation(); sumExpl.setDescription("sum of:"); int coord = 0; float sum = 0....
public static void main(String[] args) throws Exception { AnalyzerGuru af = new AnalyzerGuru(); System.out.println("<pre wrap=true>"); for (String arg : args) { try { FileAnalyzerFactory an = AnalyzerGuru.find(arg); File f = new File(arg); ...
public static void main(String[] args) { AnalyzerGuru af = new AnalyzerGuru(); System.out.println("<pre wrap=true>"); for (String arg : args) { try { File f = new File(arg); BufferedInputStream in = new BufferedInputStream(new FileInputStream(f)); ...
public void open() throws MessagingException { try { mTransport.open(); // Eat the banner executeSimpleCommand(null); String localHost = "localhost"; // Try to get local address in the proper format. InetAddress localAddress = mTransp...
public void open() throws MessagingException { try { mTransport.open(); // Eat the banner executeSimpleCommand(null); String localHost = "localhost"; // Try to get local address in the proper format. InetAddress localAddress = mTransp...
public void onEnable() { Votifier.instance = this; // Handle configuration. if (!getDataFolder().exists()) { getDataFolder().mkdir(); } File config = new File(getDataFolder() + "/config.yml"); YamlConfiguration cfg = YamlConfiguration.loadConfiguration(config); File rsaDirectory = new File(getDataFolde...
public void onEnable() { Votifier.instance = this; // Handle configuration. if (!getDataFolder().exists()) { getDataFolder().mkdir(); } File config = new File(getDataFolder() + "/config.yml"); YamlConfiguration cfg = YamlConfiguration.loadConfiguration(config); File rsaDirectory = new File(getDataFolde...
private Map<String, Map<String, String>> accumulateMRStats() throws ExecException { Job lastJob = getLastJob(jc.getSuccessfulJobs()); for(Job job : jc.getSuccessfulJobs()) { JobConf jobConf = job.getJobConf(); ...
private Map<String, Map<String, String>> accumulateMRStats() throws ExecException { Job lastJob = getLastJob(jc.getSuccessfulJobs()); for(Job job : jc.getSuccessfulJobs()) { JobConf jobConf = job.getJobConf(); ...
public void createProject( @CliOption(key = { "", "topLevelPackage" }, mandatory = true, optionContext = "update", help = "The uppermost package name (this becomes the <groupId> in Maven and also the '~' value when using Roo's shell)") JavaPackage topLevelPackage, @CliOption(key = "projectName", mandatory = false...
public void createProject( @CliOption(key = { "", "topLevelPackage" }, mandatory = true, optionContext = "update", help = "The uppermost package name (this becomes the <groupId> in Maven and also the '~' value when using Roo's shell)") JavaPackage topLevelPackage, @CliOption(key = "projectName", mandatory = false...
private IOriWorkflowService getRemoteOriWorkflowService(String username) { if (_oriWorkflowServices == null) { _oriWorkflowServices = new HashMap<String, IOriWorkflowService>(); } IOriWorkflowService oriWorkflowService = _oriWorkflowServices.get(username); if( oriWorkflowService == null ) { String ws...
private IOriWorkflowService getRemoteOriWorkflowService(String username) { if (_oriWorkflowServices == null) { _oriWorkflowServices = new HashMap<String, IOriWorkflowService>(); } IOriWorkflowService oriWorkflowService = _oriWorkflowServices.get(username); if( oriWorkflowService == null ) { String ws...
public BasicHeapGraph(final PointerAnalysis P, final CallGraph callGraph) throws NullPointerException { super(P.getHeapModel()); this.pointerAnalysis = P; this.callGraph = callGraph; final OrdinalSetMapping<PointerKey> pointerKeys = getPointerKeys(); final NumberedNodeManager<Object> nodeMgr = ne...
public BasicHeapGraph(final PointerAnalysis P, final CallGraph callGraph) throws NullPointerException { super(P.getHeapModel()); this.pointerAnalysis = P; this.callGraph = callGraph; final OrdinalSetMapping<PointerKey> pointerKeys = getPointerKeys(); final NumberedNodeManager<Object> nodeMgr = ne...
public boolean generate(BlockChangeDelegate arg0, Random random, int i, int j, int k) { final int l = random.nextInt(8) + 24; final int i1 = 1 + random.nextInt(12); final int j1 = l - i1; final int k1 = 2 + random.nextInt(6); if (j < 1 || j + l + 1 > 256) return false; final int l1 = arg0.getTypeId(i, j ...
public boolean generate(BlockChangeDelegate arg0, Random random, int i, int j, int k) { final int l = random.nextInt(30) + 32; final int i1 = 1 + random.nextInt(12); final int j1 = l - i1; final int k1 = 2 + random.nextInt(6); if (j < 1 || j + l + 1 > 256) return false; final int l1 = arg0.getTypeId(i, j...
public void service(SourceBean request, SourceBean response) { String expression; JSONArray fieldsJSON; // filed in context (mapped by unique name and by alias) Set availableDMFields; Set availableQFields; // unresolved field reference errors stack List uresolvedReferenceErrors; List items; ...
public void service(SourceBean request, SourceBean response) { String expression; JSONArray fieldsJSON; // filed in context (mapped by unique name and by alias) Set availableDMFields; Set availableQFields; // unresolved field reference errors stack List uresolvedReferenceErrors; List items; ...
public void draw(float x, float y) { // System.err.println("LayerView#draw using: " + x + ", " + y + ". "); // DEBUG // System.err.println("LayerView#draw This layer has x, y " + layer.x() + ", " + layer.y() ); // DEBUG // This will propagate layer locatins down to child layers. Is this correct? // I...
public void draw(float x, float y) { // System.err.println("LayerView#draw using: " + x + ", " + y + ". "); // DEBUG // System.err.println("LayerView#draw This layer has x, y " + layer.x() + ", " + layer.y() ); // DEBUG // This will propagate layer locatins down to child layers. Is this correct? // I...
public ServiceInterface create(String interfaceUrl, String username, char[] password, String myProxyServer, String myProxyPort, Object[] otherOptions) throws ServiceInterfaceException { try { final QName serviceName = new QName( "http://api.grisu.arcs.org.au/", "GrisuService"); final QName portNam...
public ServiceInterface create(String interfaceUrl, String username, char[] password, String myProxyServer, String myProxyPort, Object[] otherOptions) throws ServiceInterfaceException { try { final QName serviceName = new QName( "http://api.grisu.arcs.org.au/", "GrisuService"); final QName portNam...
public void load(ScmConfiguration other) { this.servername = other.servername; this.dateFormat = other.dateFormat; this.pluginUrl = other.pluginUrl; this.anonymousAccessEnabled = other.anonymousAccessEnabled; this.adminUsers = other.adminUsers; this.adminGroups = other.adminGroups; this....
public void load(ScmConfiguration other) { this.servername = other.servername; this.dateFormat = other.dateFormat; this.pluginUrl = other.pluginUrl; this.anonymousAccessEnabled = other.anonymousAccessEnabled; this.adminUsers = other.adminUsers; this.adminGroups = other.adminGroups; this....
public void setDownsample( View view, String fileName ) { if ( fileName.equals( lastFileName )) { return; } lastFileName = fileName; if ( fileName == null ) { view.setBackgroundDrawable( null ); return; } Context context = view.getContext(); AssetManager assets = context.getAssets(); try {...
public void setDownsample( View view, String fileName ) { if ( fileName != null && fileName.equals( lastFileName )) { return; } lastFileName = fileName; if ( fileName == null ) { view.setBackgroundDrawable( null ); return; } Context context = view.getContext(); AssetManager assets = context....
private VelocityContext createContext(Build build, VelocityContext ctx) throws Exception { VelocityContext context = new VelocityContext(ctx); // System info context.put("luntbuild_webroot", extractRootUrl(build.getUrl())); context.put("luntbuild_servlet_url", Luntbuild.getServletUr...
private VelocityContext createContext(Build build, VelocityContext ctx) throws Exception { VelocityContext context = new VelocityContext(ctx); // System info context.put("luntbuild_webroot", extractRootUrl(build.getUrl())); context.put("luntbuild_servlet_url", Luntbuild.getServletUr...
public void initialize(FMLPreInitializationEvent evt) { Configuration cfg = new Configuration(evt.getSuggestedConfigurationFile()); cfg.load(); Property PropCompactLaserBlock = cfg.get("", "CompactLaser", 1300); CompactLaserBlockId = PropCompactLaserBlock.getInt(); CompactLaserBlock = new BlockCompactLaser...
public void initialize(FMLPreInitializationEvent evt) { Configuration cfg = new Configuration(evt.getSuggestedConfigurationFile()); cfg.load(); Property PropCompactLaserBlock = cfg.get(Configuration.CATEGORY_BLOCK, "CompactLaser", 1300); CompactLaserBlockId = PropCompactLaserBlock.getInt(); CompactLaserBlo...
public static double RandInRange(double start, double end) { Random rand = new Random(System.nanoTime()); return rand.nextDouble() * end; }
public static double RandInRange(double start, double end) { return Math.random() * (end - start) + start; }
public void beginContact(Contact arg0) { Player player=Game.getTheGame().getPlayer1(); Ship shipPlayer=player.getShip(); Body body; Body body2; Ship enemy; Bullet bullet; Bonus bonus; //if one of the two body that collided is the body of the player's ship if((arg0.getFixtureA().getBody()==shipPlay...
public void beginContact(Contact arg0) { Player player=Game.getTheGame().getPlayer1(); Ship shipPlayer=player.getShip(); Body body; Body body2; Ship enemy; Bullet bullet; Bonus bonus; //if one of the two body that collided is the body of the player's ship if((arg0.getFixtureA().getBody()==shipPlay...
public String addMediaToItemGrading(javax.faces.event.ValueChangeEvent e) { GradingService gradingService = new GradingService(); PublishedAssessmentService publishedService = new PublishedAssessmentService(); PublishedAssessmentFacade publishedAssessment = publishedService.getPublishedAssessment(assess...
public String addMediaToItemGrading(javax.faces.event.ValueChangeEvent e) { GradingService gradingService = new GradingService(); PublishedAssessmentService publishedService = new PublishedAssessmentService(); PublishedAssessmentFacade publishedAssessment = publishedService.getPublishedAssessment(assess...
public Editor(Base ibase, String path, int[] location) { super("Arduino"); this.base = ibase; Base.setIcon(this); // Install default actions for Run, Present, etc. resetHandlers(); // add listener to handle window close box hit event addWindowListener(new WindowAdapter() { publi...
public Editor(Base ibase, String path, int[] location) { super("Arduino"); this.base = ibase; Base.setIcon(this); // Install default actions for Run, Present, etc. resetHandlers(); // add listener to handle window close box hit event addWindowListener(new WindowAdapter() { publi...
private SuiteResult(File xmlReport, Element suite) throws DocumentException { String name = suite.attributeValue("name"); if(name==null) // some user reported that name is null in their environment. // see http://www.nabble.com/Unexpected-Null-Pointer-Exception-in-Hudson-1.13...
private SuiteResult(File xmlReport, Element suite) throws DocumentException { String name = suite.attributeValue("name"); if(name==null) // some user reported that name is null in their environment. // see http://www.nabble.com/Unexpected-Null-Pointer-Exception-in-Hudson-1.13...
public void onPlayerInteract(PlayerInteractEvent event){ if(event.getAction().equals(Action.RIGHT_CLICK_BLOCK)){ if(event.isCancelled()){ return; } DropChestPlayer dplayer = DropChestPlayer.getPlayerByName(event.getPlayer().getName()); Block b = event.getClickedBlock(); if(DropChestItem.acceptsBlo...
public void onPlayerInteract(PlayerInteractEvent event){ if(event.getAction().equals(Action.RIGHT_CLICK_BLOCK)){ if(event.isCancelled()){ return; } DropChestPlayer dplayer = DropChestPlayer.getPlayerByName(event.getPlayer().getName()); Block b = event.getClickedBlock(); if(DropChestItem.acceptsBlo...
public void testSettingsInterface() throws IOException { final ImmutableSettings.Builder settings = new ImmutableSettings.Builder(); // global settings settings.fieldPrefix("_"); settings.jsr305Annotations(true); settings.guava(true); settings.qualityCheck(true); // immutable settings settings.copyMe...
public void testSettingsInterface() throws IOException { final ImmutableSettings.Builder settings = new ImmutableSettings.Builder(); // global settings settings.fieldPrefix("_"); settings.jsr305Annotations(true); settings.guava(true); settings.qualityCheck(true); // immutable settings settings.copyMe...
public List<Expression> lexLine(String line, int linNum){ line = line.trim(); line = line.replace(","," "); line = line.split(";")[0]; String[] segments = line.split("\\|"); List<Expression> expressions = new ArrayList<Expression>(); for(String s:segments){ ...
public List<Expression> lexLine(String line, int linNum){ line = line.trim(); line = line.replace(","," "); if (line.equals(";")) { line = ""; } else { line = line.split(";")[0]; } String[] segments = line.split("\\|"); List<Expression...
protected void buildPage() { // lay out page 2 String pattern = groupField.getText(); // parse file pattern fp = new FilePattern(pattern); if (!fp.isValid()) { SwingUtil.setWaitCursor(dialog, false); JOptionPane.showMessageDialog(dialog, fp.getErrorMessage(), "VisBio", JOption...
protected void buildPage() { // lay out page 2 String pattern = groupField.getText(); // parse file pattern fp = new FilePattern(pattern); if (!fp.isValid()) { SwingUtil.setWaitCursor(dialog, false); enableButtons(); JOptionPane.showMessageDialog(dialog, fp.getErrorMessage(), ...
private ArrayList<TreeMap<Integer, Integer>> getLongestSubsequenceMappingFromRecognizedTexts(){ ArrayList<TreeMap<Integer, Integer>> recognizedTextLongestSubsequences = new ArrayList<TreeMap<Integer, Integer>>(); for (Iterator<RecognizedTextOfSingleAudiofile> it = this.recognizedAudioFiles.iterator(...
private ArrayList<TreeMap<Integer, Integer>> getLongestSubsequenceMappingFromRecognizedTexts(){ ArrayList<TreeMap<Integer, Integer>> recognizedTextLongestSubsequences = new ArrayList<TreeMap<Integer, Integer>>(); for (Iterator<RecognizedTextOfSingleAudiofile> it = this.recognizedAudioFiles.iterator(...
public void print() { System.out.println(" METHOD: " + name); System.out.println(" Return Type: " + returnType); System.out.println(" Calls: "); for(Method m: methodCalls) System.out.println(" " + m.getName()); System.out.println(" Called By: "); for(Method m: calledBy) Syste...
public void print() { System.out.println(" METHOD: " + name); System.out.println(" Return Type: " + returnType); System.out.println(" Start Character: " + this.startChar); System.out.println(" End Character: " + this.endChar); System.out.println(" Calls: "); for(Method m: methodCalls...
public Instances transformInstances(Instances data) throws Exception { numPredictors = data.numAttributes()-numOfLabels; Instances transformed = new Instances(data, 0); // delete all labels RemoveAllLabels ral = new RemoveAllLabels(); transformed = ral.trans...
public Instances transformInstances(Instances data) throws Exception { numPredictors = data.numAttributes()-numOfLabels; Instances transformed = new Instances(data, 0); // delete all labels RemoveAllLabels ral = new RemoveAllLabels(); transformed = ral.trans...
public Frame score( Frame fr) { int ridx = fr.find(_names[_names.length-1]); if(ridx != -1){ // drop the response for scoring! fr = new Frame(fr._names,fr.vecs()); fr.remove(ridx); } // Adapt the Frame layout - returns adapted frame and frame containing only // newly created vectors ...
public Frame score( Frame fr) { int ridx = fr.find(_names[_names.length-1]); if(ridx != -1){ // drop the response for scoring! fr = new Frame(fr._names,fr.vecs().clone()); fr.remove(ridx); } // Adapt the Frame layout - returns adapted frame and frame containing only // newly created ve...
private boolean matchPath(Dict dict, String path) { String glob = dict.getString(ACCESS_PATH, null); String regex = dict.getString(ACCESS_REGEX, null); Pattern m = (Pattern) dict.get("_" + ACCESS_REGEX); if (m == null && glob != null) { glob = glob.replace(".", "\\.").rep...
private boolean matchPath(Dict dict, String path) { String glob = dict.getString(ACCESS_PATH, null); String regex = dict.getString(ACCESS_REGEX, null); Pattern m = (Pattern) dict.get("_" + ACCESS_REGEX); if (m == null && glob != null) { glob = glob.replace("\\", "\\\\").r...
public Configuration() { //defaults for an opengrok instance configuration setHistoryCache(true); setHistoryCacheTime(30); setHistoryCacheInDB(false); setProjects(new ArrayList<Project>()); setRepositories(new ArrayList<RepositoryInfo>()); setUrlPrefix("/sourc...
public Configuration() { //defaults for an opengrok instance configuration setHistoryCache(true); setHistoryCacheTime(30); setHistoryCacheInDB(false); setProjects(new ArrayList<Project>()); setRepositories(new ArrayList<RepositoryInfo>()); setUrlPrefix("/sourc...
public boolean isResponsibleForUnit(final Person person, final Money amount) { Set<Authorization> validAuthorizations = person.getValidAuthorizations(); for (Unit unit : getPayingUnits()) { for (Authorization authorization : validAuthorizations) { if (authorization.getMaxAmount().isGreaterThanOrEqual(amoun...
public boolean isResponsibleForUnit(final Person person, final Money amount) { Set<Authorization> validAuthorizations = person.getValidAuthorizations(); for (Unit unit : getPayingUnits()) { for (Authorization authorization : validAuthorizations) { if (authorization.getMaxAmount().isGreaterThanOrEqual(amoun...
public boolean onTouchEvent(MotionEvent e) { // TODO Auto-generated method stub int x = (int) e.getX(); int y = (int) e.getY(); //Check for button press if (buttonR.contains(x, y)){ if (selection.width()>0 && selection.height() >0){ Intent i = new Intent(FaceSelectActivity.this,BobActivity....
public boolean onTouchEvent(MotionEvent e) { // TODO Auto-generated method stub int x = (int) e.getX(); int y = (int) e.getY(); //Check for button press if (buttonR.contains(x, y)){ if (selection.width()>0 && selection.height() >0){ Intent i = new Intent(FaceSelectActivity.this,BobActivity....
public Object doInTransaction(TransactionStatus status) { TransactionSynchronizationManager.registerSynchronization(this); RepeatStatus result = RepeatStatus.CONTINUABLE; StepContribution contribution = stepExecution.createStepContribution(); chunkListener.beforeChunk(chunkContext); // In case we n...
public Object doInTransaction(TransactionStatus status) { TransactionSynchronizationManager.registerSynchronization(this); RepeatStatus result = RepeatStatus.CONTINUABLE; StepContribution contribution = stepExecution.createStepContribution(); chunkListener.beforeChunk(chunkContext); // In case we n...
private void performDownload(HttpServletRequest req, HttpServletResponse res) throws IOException { // if there is a parameter named "download_0", then, by convention, // there are more than one files to be downloaded in a zip file. if (req.getParameter("download_0") != null) { // traverse all files ...
private void performDownload(HttpServletRequest req, HttpServletResponse res) throws IOException { // if there is a parameter named "download_0", then, by convention, // there are more than one files to be downloaded in a zip file. if (req.getParameter("download_0") != null) { // traverse all files ...
public void onSurfaceCreated(GL10 gl, EGLConfig config) { RajLog.setGL10(gl); Capabilities.getInstance(); String[] versionString = (gl.glGetString(GL10.GL_VERSION)).split(" "); if (versionString.length >= 3) { String[] versionParts = versionString[2].split("."); if (versionParts.length == 2) { mGL...
public void onSurfaceCreated(GL10 gl, EGLConfig config) { RajLog.setGL10(gl); Capabilities.getInstance(); String[] versionString = (gl.glGetString(GL10.GL_VERSION)).split(" "); if (versionString.length >= 3) { String[] versionParts = versionString[2].split("\\."); if (versionParts.length >= 2) { m...
private void executeSqlBatch(String dbname, String[] queryarr, JSONArray[] jsonparams, String[] queryIDs, CallbackContext cbc) { Long db = this.getDatabase(dbname); if (db == null) return; long mydb = db.longValue(); String query = ""; String query_id = ""; int len = queryarr.length; JSONArray batch...
private void executeSqlBatch(String dbname, String[] queryarr, JSONArray[] jsonparams, String[] queryIDs, CallbackContext cbc) { Long db = this.getDatabase(dbname); if (db == null) return; long mydb = db.longValue(); String query = ""; String query_id = ""; int len = queryarr.length; JSONArray batch...