id
int64
22
34.9k
original_code
stringlengths
31
107k
code_wo_comment
stringlengths
29
77.3k
cleancode
stringlengths
25
62.1k
repo
stringlengths
6
65
label
listlengths
4
4
8,369
public static void attachEndpointToSession(Channel channel, Endpoint endpoint) { // TODO // Netty allow to set/get attachment on Channel in the near feature, e.g. // channel.getAttribute(new AttributeKey<Endpoint>(TRANSPORT_SENDER)) endpoints.set(channel, endpoint); }
public static void attachEndpointToSession(Channel channel, Endpoint endpoint) { endpoints.set(channel, endpoint); }
public static void attachendpointtosession(channel channel, endpoint endpoint) { endpoints.set(channel, endpoint); }
tianshaojie/common-framework
[ 0, 1, 0, 0 ]
24,782
private void searchTweets(final String keyword) { safelyUnsubscribe(subDelayedSearch, subLoadMoreTweets, subSearchTweets); lastKeyword = keyword; if (!networkApi.isConnectedToInternet(this)) { showSnackBar(msgNoInternetConnection); return; } if (!twitterAp...
private void searchTweets(final String keyword) { safelyUnsubscribe(subDelayedSearch, subLoadMoreTweets, subSearchTweets); lastKeyword = keyword; if (!networkApi.isConnectedToInternet(this)) { showSnackBar(msgNoInternetConnection); return; } if (!twitterAp...
private void searchtweets(final string keyword) { safelyunsubscribe(subdelayedsearch, subloadmoretweets, subsearchtweets); lastkeyword = keyword; if (!networkapi.isconnectedtointernet(this)) { showsnackbar(msgnointernetconnection); return; } if (!twitterapi.cansearchtweets(keyword)) { return; } subsearchtweets = twitte...
umeshbsa/android-twitter-search-api
[ 0, 0, 0, 0 ]
24,804
@SuppressWarnings("restriction") private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist, Map<String, Object> code) { logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||" + childVaccinaterecord.getVaccineid()); Object signObjVaccid = Cache...
@SuppressWarnings("restriction") private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist, Map<String, Object> code) { logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||" + childVaccinaterecord.getVaccineid()); Object signObjVaccid = Cache...
@suppresswarnings("restriction") private void updatedjtsign(childvaccinaterecord childvaccinaterecord, map<string, object> maplist, map<string, object> code) { logger.info("获取排号签字数据开始" + childvaccinaterecord.getnid().substring(0, 2) + "||" + childvaccinaterecord.getvaccineid()); object signobjvaccid = cacheutils.get(ca...
wufang742987117/vaccinate
[ 0, 1, 0, 0 ]
24,825
public synchronized void draw_World(){ //for each cells ant1nbCells=0; ant2nbCells=0; ant3nbCells=0; ant4nbCells=0; for (int x=0;x<WIDTH;x++){ for (int y=0;y<HEIGHT;y++){ //test is colorized if (world.getLocation().get((WIDTH*y)+x)....
public synchronized void draw_World(){ ant1nbCells=0; ant2nbCells=0; ant3nbCells=0; ant4nbCells=0; for (int x=0;x<WIDTH;x++){ for (int y=0;y<HEIGHT;y++){ if (world.getLocation().get((WIDTH*y)+x).isColorized()){ ...
public synchronized void draw_world(){ ant1nbcells=0; ant2nbcells=0; ant3nbcells=0; ant4nbcells=0; for (int x=0;x<width;x++){ for (int y=0;y<height;y++){ if (world.getlocation().get((width*y)+x).iscolorized()){ wimgworld.getpixelwriter().setcolor(x, y, world.getlocation().get((width*y)+x).getcolors()); if (world.getloc...
tondeur-h/LangTonAnt
[ 1, 0, 0, 0 ]
16,665
public void clearNzSessions() throws IOException, InterruptedException { String pathToNzSession = System.getProperty( NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH); // Run nzsession and capture a list of open transactions. ArrayList<String> args = new ArrayList<String>(); args.add(pathToNzSessio...
public void clearNzSessions() throws IOException, InterruptedException { String pathToNzSession = System.getProperty( NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH); ArrayList<String> args = new ArrayList<String>(); args.add(pathToNzSession); args.add("-host"); args.add(NETEZZA_HOST); ...
public void clearnzsessions() throws ioexception, interruptedexception { string pathtonzsession = system.getproperty( nz_session_path_key, default_nz_session_path); arraylist<string> args = new arraylist<string>(); args.add(pathtonzsession); args.add("-host"); args.add(netezza_host); args.add("-u"); args.add(admin_user...
viveshs/sqoop-netezza-connector
[ 1, 0, 0, 0 ]
16,761
@CalledByNative protected void releaseOutputBuffer(int index, boolean render) { try { mMediaCodec.releaseOutputBuffer(index, render); } catch (IllegalStateException e) { // TODO(qinmin): May need to report the error to the caller. crbug.com/356498. Log.e(TAG, "Fai...
@CalledByNative protected void releaseOutputBuffer(int index, boolean render) { try { mMediaCodec.releaseOutputBuffer(index, render); } catch (IllegalStateException e) { Log.e(TAG, "Failed to release output buffer", e); } }
@calledbynative protected void releaseoutputbuffer(int index, boolean render) { try { mmediacodec.releaseoutputbuffer(index, render); } catch (illegalstateexception e) { log.e(tag, "failed to release output buffer", e); } }
zealoussnow/chromium
[ 0, 1, 0, 0 ]
16,764
@Override public void onError(MediaCodec codec, MediaCodec.CodecException e) { // TODO(dalecurtis): We may want to drop transient errors here. Log.e(TAG, "MediaCodec.onError: %s", e.getDiagnosticInfo()); mMediaCodecBridge.onError(e); }
@Override public void onError(MediaCodec codec, MediaCodec.CodecException e) { Log.e(TAG, "MediaCodec.onError: %s", e.getDiagnosticInfo()); mMediaCodecBridge.onError(e); }
@override public void onerror(mediacodec codec, mediacodec.codecexception e) { log.e(tag, "mediacodec.onerror: %s", e.getdiagnosticinfo()); mmediacodecbridge.onerror(e); }
zealoussnow/chromium
[ 0, 1, 0, 0 ]
25,136
@VisibleForTesting static RateLimiter create(SleepingStopwatch stopwatch, double permitsPerSecond) { RateLimiter rateLimiter = new SmoothBursty(stopwatch, 1.0 /* maxBurstSeconds */); rateLimiter.setRate(permitsPerSecond); return rateLimiter; }
@VisibleForTesting static RateLimiter create(SleepingStopwatch stopwatch, double permitsPerSecond) { RateLimiter rateLimiter = new SmoothBursty(stopwatch, 1.0); rateLimiter.setRate(permitsPerSecond); return rateLimiter; }
@visiblefortesting static ratelimiter create(sleepingstopwatch stopwatch, double permitspersecond) { ratelimiter ratelimiter = new smoothbursty(stopwatch, 1.0); ratelimiter.setrate(permitspersecond); return ratelimiter; }
xushjie1987/common-utils
[ 0, 1, 0, 0 ]
571
public static void simulateAutoIncrement(Connection connection, String tableName, String columnName) throws SQLException { String sequenceName = tableName + "_seq"; String triggerName = tableName + "_id"; connection.prepareStatement( "CREATE sequence " + sequenceName + " start wi...
public static void simulateAutoIncrement(Connection connection, String tableName, String columnName) throws SQLException { String sequenceName = tableName + "_seq"; String triggerName = tableName + "_id"; connection.prepareStatement( "CREATE sequence " + sequenceName + " start wi...
public static void simulateautoincrement(connection connection, string tablename, string columnname) throws sqlexception { string sequencename = tablename + "_seq"; string triggername = tablename + "_id"; connection.preparestatement( "create sequence " + sequencename + " start with 1 increment by 1 nocycle" ).executeup...
szymek22/AxonFramework
[ 0, 0, 1, 0 ]
8,804
public void handle(ExtendedBlock block, IOException e) { FsVolumeSpi volume = scanner.volume; if (e == null) { LOG.trace("Successfully scanned {} on {}", block, volume); return; } // If the block does not exist anymore, then it's not an error. if (!volume.getDataset().conta...
public void handle(ExtendedBlock block, IOException e) { FsVolumeSpi volume = scanner.volume; if (e == null) { LOG.trace("Successfully scanned {} on {}", block, volume); return; } if (!volume.getDataset().contains(block)) { LOG.debug("Volume {}: block {} is no longe...
public void handle(extendedblock block, ioexception e) { fsvolumespi volume = scanner.volume; if (e == null) { log.trace("successfully scanned {} on {}", block, volume); return; } if (!volume.getdataset().contains(block)) { log.debug("volume {}: block {} is no longer in the dataset.", volume, block); return; } if (e in...
xiaojimi/hadoop
[ 1, 0, 0, 0 ]
17,001
@Override @SuppressWarnings("unchecked") public Set keySet(Predicate predicate) { checkTransactionState(); checkNotNull(predicate, "Predicate should not be null!"); checkNotInstanceOf(PagingPredicate.class, predicate, "Paging is not supported for Transactional queries!"); MapQuer...
@Override @SuppressWarnings("unchecked") public Set keySet(Predicate predicate) { checkTransactionState(); checkNotNull(predicate, "Predicate should not be null!"); checkNotInstanceOf(PagingPredicate.class, predicate, "Paging is not supported for Transactional queries!"); MapQuer...
@override @suppresswarnings("unchecked") public set keyset(predicate predicate) { checktransactionstate(); checknotnull(predicate, "predicate should not be null!"); checknotinstanceof(pagingpredicate.class, predicate, "paging is not supported for transactional queries!"); mapqueryengine queryengine = mapservicecontext....
tsasaki609/hazelcast
[ 1, 0, 0, 0 ]
17,002
@Override @SuppressWarnings("unchecked") public Collection values(Predicate predicate) { checkTransactionState(); checkNotNull(predicate, "Predicate can not be null!"); checkNotInstanceOf(PagingPredicate.class, predicate, "Paging is not supported for Transactional queries"); MapQ...
@Override @SuppressWarnings("unchecked") public Collection values(Predicate predicate) { checkTransactionState(); checkNotNull(predicate, "Predicate can not be null!"); checkNotInstanceOf(PagingPredicate.class, predicate, "Paging is not supported for Transactional queries"); MapQ...
@override @suppresswarnings("unchecked") public collection values(predicate predicate) { checktransactionstate(); checknotnull(predicate, "predicate can not be null!"); checknotinstanceof(pagingpredicate.class, predicate, "paging is not supported for transactional queries"); mapqueryengine queryengine = mapserviceconte...
tsasaki609/hazelcast
[ 1, 0, 0, 0 ]
25,228
private static void resetStatSpecs(String testId, List testContainers, String statSpecFileOverride) { if (testContainers.size() == 1) { // special case TestContainer testContainer = (TestContainer)testContainers.get(0); // determine which statspec file to use S...
private static void resetStatSpecs(String testId, List testContainers, String statSpecFileOverride) { if (testContainers.size() == 1) { TestContainer testContainer = (TestContainer)testContainers.get(0); String statSpecFile = statSpecFileOverride; if (sta...
private static void resetstatspecs(string testid, list testcontainers, string statspecfileoverride) { if (testcontainers.size() == 1) { testcontainer testcontainer = (testcontainer)testcontainers.get(0); string statspecfile = statspecfileoverride; if (statspecfileoverride == null) { statspecfile = getlaststatspecfile(t...
xyxiaoyou/snappy-store
[ 0, 1, 0, 0 ]
25,229
private static List buildValueComparators(String testId, List testContainers) { List comparators = new ArrayList(); for (int i = 0; i < testContainers.size(); i++) { TestContainer testContainer = (TestContainer)testContainers.get(i); List tests = testConta...
private static List buildValueComparators(String testId, List testContainers) { List comparators = new ArrayList(); for (int i = 0; i < testContainers.size(); i++) { TestContainer testContainer = (TestContainer)testContainers.get(i); List tests = testConta...
private static list buildvaluecomparators(string testid, list testcontainers) { list comparators = new arraylist(); for (int i = 0; i < testcontainers.size(); i++) { testcontainer testcontainer = (testcontainer)testcontainers.get(i); list tests = testcontainer.gettestswithid(testid); if (tests.size() == 0) { comparator...
xyxiaoyou/snappy-store
[ 0, 1, 0, 0 ]
8,858
private static void addWatermarkText(PDDocument doc, PDPage page, PDFont font, String text) throws IOException { try (PDPageContentStream cs = new PDPageContentStream(doc, page, PDPageContentStream.AppendMode.APPEND, true, true)) { float fontHeight = 100; // a...
private static void addWatermarkText(PDDocument doc, PDPage page, PDFont font, String text) throws IOException { try (PDPageContentStream cs = new PDPageContentStream(doc, page, PDPageContentStream.AppendMode.APPEND, true, true)) { float fontHeight = 100; ...
private static void addwatermarktext(pddocument doc, pdpage page, pdfont font, string text) throws ioexception { try (pdpagecontentstream cs = new pdpagecontentstream(doc, page, pdpagecontentstream.appendmode.append, true, true)) { float fontheight = 100; float width = page.getmediabox().getwidth(); float height = page...
vijji432/pdfbox
[ 0, 0, 1, 0 ]
17,057
private void deflateData(boolean force) throws IOException { //we don't need to flush here, as this should have been called already by the time we get to //this point boolean nextCreated = false; try { PooledByteBuffer pooled = this.currentBuffer; final ByteBuffer...
private void deflateData(boolean force) throws IOException { boolean nextCreated = false; try { PooledByteBuffer pooled = this.currentBuffer; final ByteBuffer outputBuffer = pooled.getBuffer(); final boolean shutdown = anyAreSet(state, SHUTDOWN); ...
private void deflatedata(boolean force) throws ioexception { boolean nextcreated = false; try { pooledbytebuffer pooled = this.currentbuffer; final bytebuffer outputbuffer = pooled.getbuffer(); final boolean shutdown = anyareset(state, shutdown); byte[] buffer = new byte[1024]; while (force || !deflater.needsinput() ||...
yzy830/undertow-analyze
[ 1, 0, 0, 0 ]
33,483
public void copyData(DataWrapper body, byte[] data, int offset) { for(int i = 0; i < body.getReadableSize(); i++) { //TODO: Think about using System.arrayCopy here(what is faster?) data[offset + i] = body.readByteAt(i); } }
public void copyData(DataWrapper body, byte[] data, int offset) { for(int i = 0; i < body.getReadableSize(); i++) { data[offset + i] = body.readByteAt(i); } }
public void copydata(datawrapper body, byte[] data, int offset) { for(int i = 0; i < body.getreadablesize(); i++) { data[offset + i] = body.readbyteat(i); } }
zreed/webpieces
[ 1, 0, 0, 0 ]
33,494
public boolean expire(Table table) { if (expirationPeriod <= 0) { return false; } long current = System.currentTimeMillis(); Long last = expirationStatus.putIfAbsent(table.location(), current); if (last != null && current - last >= expirationPeriod) { expirationStatus.put(table.location(...
public boolean expire(Table table) { if (expirationPeriod <= 0) { return false; } long current = System.currentTimeMillis(); Long last = expirationStatus.putIfAbsent(table.location(), current); if (last != null && current - last >= expirationPeriod) { expirationStatus.put(table.location(...
public boolean expire(table table) { if (expirationperiod <= 0) { return false; } long current = system.currenttimemillis(); long last = expirationstatus.putifabsent(table.location(), current); if (last != null && current - last >= expirationperiod) { expirationstatus.put(table.location(), current); executorservice exe...
yanlin-Lynn/drill
[ 1, 0, 0, 0 ]
728
protected boolean shouldNotifyObserversOnSetIndex() { return true; }
protected boolean shouldNotifyObserversOnSetIndex() { return true; }
protected boolean shouldnotifyobserversonsetindex() { return true; }
zealoussnow/chromium
[ 0, 0, 1, 0 ]
8,942
private void configureEditableItem() { String editText = item.getText(); etEditItem = (EditText) findViewById(R.id.etEditItem); etEditItem.setText(editText); etEditItem.setSelection(editText.length()); // TODO: allow user to not choose a date (and make the datepicker look a lot b...
private void configureEditableItem() { String editText = item.getText(); etEditItem = (EditText) findViewById(R.id.etEditItem); etEditItem.setText(editText); etEditItem.setSelection(editText.length()); etDueDate = (EditText) findViewById(R.id.etDueDate); String du...
private void configureeditableitem() { string edittext = item.gettext(); etedititem = (edittext) findviewbyid(r.id.etedititem); etedititem.settext(edittext); etedititem.setselection(edittext.length()); etduedate = (edittext) findviewbyid(r.id.etduedate); string duedate = item.getduedate(); etduedate.settext(duedate); s...
willieowens/simpletodo
[ 1, 0, 0, 0 ]
776
@Override public int write(ChannelBuffer cb) { // TODO This will be implemented in the next version return 0; }
@Override public int write(ChannelBuffer cb) { return 0; }
@override public int write(channelbuffer cb) { return 0; }
ustc-fhq/onos
[ 0, 1, 0, 0 ]
17,189
@Override public void allocateMultiple(MemoryBuffer[] dest, int size) throws AllocatorOutOfMemoryException { assert size > 0 : "size is " + size; if (size > maxAllocation) { throw new RuntimeException("Trying to allocate " + size + "; max is " + maxAllocation); } int freeListIx = 31 - Inte...
@Override public void allocateMultiple(MemoryBuffer[] dest, int size) throws AllocatorOutOfMemoryException { assert size > 0 : "size is " + size; if (size > maxAllocation) { throw new RuntimeException("Trying to allocate " + size + "; max is " + maxAllocation); } int freeListIx = 31 - Inte...
@override public void allocatemultiple(memorybuffer[] dest, int size) throws allocatoroutofmemoryexception { assert size > 0 : "size is " + size; if (size > maxallocation) { throw new runtimeexception("trying to allocate " + size + "; max is " + maxallocation); } int freelistix = 31 - integer.numberofleadingzeros(size)...
woowahan/hive
[ 1, 1, 0, 0 ]
17,191
private int allocateWithSplit(int arenaIx, int freeListIx, MemoryBuffer[] dest, int ix, int allocationSize) { if (data == null) return -1; // not allocated yet FreeList freeList = freeLists[freeListIx]; int remaining = -1; freeList.lock.lock(); try { // Try to allocate from...
private int allocateWithSplit(int arenaIx, int freeListIx, MemoryBuffer[] dest, int ix, int allocationSize) { if (data == null) return -1; FreeList freeList = freeLists[freeListIx]; int remaining = -1; freeList.lock.lock(); try { ix = allocateFromFreeListUnderLock( ...
private int allocatewithsplit(int arenaix, int freelistix, memorybuffer[] dest, int ix, int allocationsize) { if (data == null) return -1; freelist freelist = freelists[freelistix]; int remaining = -1; freelist.lock.lock(); try { ix = allocatefromfreelistunderlock( arenaix, freelist, freelistix, dest, ix, allocationsiz...
woowahan/hive
[ 1, 0, 0, 0 ]
17,246
private boolean checkAccessPermission() throws IOException { final JobConf jobConf = new JobConf(hiveConf); Preconditions.checkArgument(updateKey.getCachedEntitiesCount() > 0, "hive partition update key should contain at least one path"); for (FileSystemCachedEntity cachedEntity : updateKey.getCachedE...
private boolean checkAccessPermission() throws IOException { final JobConf jobConf = new JobConf(hiveConf); Preconditions.checkArgument(updateKey.getCachedEntitiesCount() > 0, "hive partition update key should contain at least one path"); for (FileSystemCachedEntity cachedEntity : updateKey.getCachedE...
private boolean checkaccesspermission() throws ioexception { final jobconf jobconf = new jobconf(hiveconf); preconditions.checkargument(updatekey.getcachedentitiescount() > 0, "hive partition update key should contain at least one path"); for (filesystemcachedentity cachedentity : updatekey.getcachedentitieslist()) { f...
wangchong6808/dremio-oss
[ 1, 1, 0, 0 ]
17,282
private void ntlmProxyChallenge(String authenticateHeader,// Request request,// HttpHeaders requestHeaders,// Realm proxyRealm,// NettyResponseFuture<?> future) { if (authenticateHeader.equals("NTLM")) { // server replied bare NTLM => we didn't preempt...
private void ntlmProxyChallenge(String authenticateHeader, Request request HttpHeaders requestHeaders Realm proxyRealm NettyResponseFuture<?> future) { if (authenticateHeader.equals("NTLM")) { String challengeHeader = NtlmEngine.INSTANCE.gen...
private void ntlmproxychallenge(string authenticateheader, request request httpheaders requestheaders realm proxyrealm nettyresponsefuture<?> future) { if (authenticateheader.equals("ntlm")) { string challengeheader = ntlmengine.instance.generatetype1msg(); requestheaders.set(httpheaders.names.proxy_authorization, "ntl...
wsargent/async-http-client
[ 0, 0, 1, 0 ]
974
private void trackWatchForAttempt(WatchedPathInfo watchedPathInfo, WatchKey watchKey) { assert watchedPathInfo.pathIdentifier != null; // TODO May be possible to do finer-grained locks. synchronized (watchesPerAttempt) { List<WatchKey> list = watchesPerAttempt.get(watchedPathInfo.pathIdentifier); ...
private void trackWatchForAttempt(WatchedPathInfo watchedPathInfo, WatchKey watchKey) { assert watchedPathInfo.pathIdentifier != null; synchronized (watchesPerAttempt) { List<WatchKey> list = watchesPerAttempt.get(watchedPathInfo.pathIdentifier); if (list == null) { list = new LinkedList...
private void trackwatchforattempt(watchedpathinfo watchedpathinfo, watchkey watchkey) { assert watchedpathinfo.pathidentifier != null; synchronized (watchesperattempt) { list<watchkey> list = watchesperattempt.get(watchedpathinfo.pathidentifier); if (list == null) { list = new linkedlist<>(); watchesperattempt.put(watc...
zem13579/hive
[ 1, 0, 0, 0 ]
975
private void cancelWatchesForAttempt(AttemptPathIdentifier pathIdentifier) { // TODO May be possible to do finer-grained locks. synchronized(watchesPerAttempt) { List<WatchKey> list = watchesPerAttempt.remove(pathIdentifier); if (list != null) { for (WatchKey watchKey : list) { wat...
private void cancelWatchesForAttempt(AttemptPathIdentifier pathIdentifier) { synchronized(watchesPerAttempt) { List<WatchKey> list = watchesPerAttempt.remove(pathIdentifier); if (list != null) { for (WatchKey watchKey : list) { watchKey.cancel(); } } } }
private void cancelwatchesforattempt(attemptpathidentifier pathidentifier) { synchronized(watchesperattempt) { list<watchkey> list = watchesperattempt.remove(pathidentifier); if (list != null) { for (watchkey watchkey : list) { watchkey.cancel(); } } } }
zem13579/hive
[ 1, 0, 0, 0 ]
1,017
public static String[] textToWords(String text) { // TODO: strip word-final or -initial apostrophes as in James' or 'cause. // Currently assuming hyphenated expressions split into two Asr words. return text.replace('-', ' ').replaceAll("['.!?,:;\"\\(\\)]", " ").toUpperCase(Locale.US).trim().spli...
public static String[] textToWords(String text) { return text.replace('-', ' ').replaceAll("['.!?,:;\"\\(\\)]", " ").toUpperCase(Locale.US).trim().split("\\s+"); }
public static string[] texttowords(string text) { return text.replace('-', ' ').replaceall("['.!?,:;\"\\(\\)]", " ").touppercase(locale.us).trim().split("\\s+"); }
yejingjie0209/robotutor_china
[ 1, 0, 0, 0 ]
1,034
public void engineSetPadding(String padding) throws NoSuchPaddingException { String paddingName = Strings.toUpperCase(padding); // TDOD: make this meaningful... if (paddingName.equals("NOPADDING")) { } else if (paddingName.equals("PKCS5PADDING") || paddingName...
public void engineSetPadding(String padding) throws NoSuchPaddingException { String paddingName = Strings.toUpperCase(padding); if (paddingName.equals("NOPADDING")) { } else if (paddingName.equals("PKCS5PADDING") || paddingName.equals("PKCS7PADDING")) ...
public void enginesetpadding(string padding) throws nosuchpaddingexception { string paddingname = strings.touppercase(padding); if (paddingname.equals("nopadding")) { } else if (paddingname.equals("pkcs5padding") || paddingname.equals("pkcs7padding")) { } else { throw new nosuchpaddingexception("padding not available w...
tonywasher/bc-java
[ 1, 0, 0, 0 ]
1,094
private void addStylesQueueRequest(int start, int length, String s) { // System.err.println(start + " ---> " + length); int startNew = backupToPossibleStyleStart(start); length = length + start - startNew; start = startNew; // System.err.println(start + " ---> " + length); if (syntaxBusy) { ...
private void addStylesQueueRequest(int start, int length, String s) { int startNew = backupToPossibleStyleStart(start); length = length + start - startNew; start = startNew; if (syntaxBusy) { styleQueue.add(new StyleQueueItem(start, length, s)); } else { if (sty...
private void addstylesqueuerequest(int start, int length, string s) { int startnew = backuptopossiblestylestart(start); length = length + start - startnew; start = startnew; if (syntaxbusy) { stylequeue.add(new stylequeueitem(start, length, s)); } else { if (stylequeue.size() != 0) system.err.println("a request got stu...
xmf-xmodeler/MosaicFX
[ 1, 0, 0, 0 ]
17,497
public long getMicrosecondLength() { long tickLength = getTickLength(); if (divisionType == PPQ) { // FIXME // How can this possible be computed? PPQ is pulses per quarter-note, // which is dependent on the tempo of the Sequencer. throw new UnsupportedOperationException("Can't...
public long getMicrosecondLength() { long tickLength = getTickLength(); if (divisionType == PPQ) { throw new UnsupportedOperationException("Can't compute PPQ based lengths yet"); } else { return (long) ((tickLength * 1000000) / (divisionType * resolution...
public long getmicrosecondlength() { long ticklength = getticklength(); if (divisiontype == ppq) { throw new unsupportedoperationexception("can't compute ppq based lengths yet"); } else { return (long) ((ticklength * 1000000) / (divisiontype * resolution)); } }
vidkidz/crossbridge
[ 0, 0, 1, 0 ]
9,309
@TargetApi(Build.VERSION_CODES.KITKAT) public static File getBestAvailableCacheRoot(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { // In KitKat we can query multiple devices. // TODO: optimize for stability instead of picking first one File[...
@TargetApi(Build.VERSION_CODES.KITKAT) public static File getBestAvailableCacheRoot(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { File[] roots = context.getExternalCacheDirs(); if (roots != null) { for (File root...
@targetapi(build.version_codes.kitkat) public static file getbestavailablecacheroot(context context) { if (build.version.sdk_int >= build.version_codes.kitkat) { file[] roots = context.getexternalcachedirs(); if (roots != null) { for (file root : roots) { if (root == null) { continue; } if (environment.media_mounted.eq...
xxwar/muzei
[ 1, 0, 0, 0 ]
9,310
@TargetApi(Build.VERSION_CODES.KITKAT) public static File getBestAvailableFilesRoot(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { // In KitKat we can query multiple devices. // TODO: optimize for stability instead of picking first one File[...
@TargetApi(Build.VERSION_CODES.KITKAT) public static File getBestAvailableFilesRoot(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { File[] roots = context.getExternalFilesDirs(null); if (roots != null) { for (File ...
@targetapi(build.version_codes.kitkat) public static file getbestavailablefilesroot(context context) { if (build.version.sdk_int >= build.version_codes.kitkat) { file[] roots = context.getexternalfilesdirs(null); if (roots != null) { for (file root : roots) { if (root == null) { continue; } if (environment.media_mounte...
xxwar/muzei
[ 1, 0, 0, 0 ]
1,129
@Test public void testMultiColumnPruning() throws IOException { shell.setHiveSessionValue("hive.cbo.enable", true); Schema schema1 = new Schema(optional(1, "fk", Types.StringType.get())); List<Record> records1 = TestHelper.RecordsBuilder.newInstance(schema1).add("fk1").build(); testTables.createTable(...
@Test public void testMultiColumnPruning() throws IOException { shell.setHiveSessionValue("hive.cbo.enable", true); Schema schema1 = new Schema(optional(1, "fk", Types.StringType.get())); List<Record> records1 = TestHelper.RecordsBuilder.newInstance(schema1).add("fk1").build(); testTables.createTable(...
@test public void testmulticolumnpruning() throws ioexception { shell.sethivesessionvalue("hive.cbo.enable", true); schema schema1 = new schema(optional(1, "fk", types.stringtype.get())); list<record> records1 = testhelper.recordsbuilder.newinstance(schema1).add("fk1").build(); testtables.createtable(shell, "table1", s...
zem13579/hive
[ 0, 0, 1, 0 ]
17,517
@Override protected void render(GLRootView root, GL11 gl) { Rect p = mPaddings; int height = getHeight() - p.top - p.bottom; StringTexture title = mText; //TODO: cut the text if it is too long title.draw(root, p.left, p.top + (height - title.getHeight()) / 2); }
@Override protected void render(GLRootView root, GL11 gl) { Rect p = mPaddings; int height = getHeight() - p.top - p.bottom; StringTexture title = mText; title.draw(root, p.left, p.top + (height - title.getHeight()) / 2); }
@override protected void render(glrootview root, gl11 gl) { rect p = mpaddings; int height = getheight() - p.top - p.bottom; stringtexture title = mtext; title.draw(root, p.left, p.top + (height - title.getheight()) / 2); }
xie-wenjie/AndroidBaseApplicationSourse
[ 0, 1, 0, 0 ]
25,738
boolean getUpdatedDocument(AddUpdateCommand cmd, long versionOnUpdate) throws IOException { if (!AtomicUpdateDocumentMerger.isAtomicUpdate(cmd)) return false; Set<String> inPlaceUpdatedFields = AtomicUpdateDocumentMerger.computeInPlaceUpdatableFields(cmd); if (inPlaceUpdatedFields.size() > 0) { // non-empty...
boolean getUpdatedDocument(AddUpdateCommand cmd, long versionOnUpdate) throws IOException { if (!AtomicUpdateDocumentMerger.isAtomicUpdate(cmd)) return false; Set<String> inPlaceUpdatedFields = AtomicUpdateDocumentMerger.computeInPlaceUpdatableFields(cmd); if (inPlaceUpdatedFields.size() > 0) { if (do...
boolean getupdateddocument(addupdatecommand cmd, long versiononupdate) throws ioexception { if (!atomicupdatedocumentmerger.isatomicupdate(cmd)) return false; set<string> inplaceupdatedfields = atomicupdatedocumentmerger.computeinplaceupdatablefields(cmd); if (inplaceupdatedfields.size() > 0) { if (docmerger.doinplaceu...
yanivru/lucene-solr
[ 1, 0, 0, 0 ]
9,374
@Override public void close() { logger.info("CLOSE ZookeeperRiver"); // TODO Your code.. }
@Override public void close() { logger.info("CLOSE ZookeeperRiver"); }
@override public void close() { logger.info("close zookeeperriver"); }
xingxiudong/elasticsearch-zkdiscovery
[ 0, 1, 0, 0 ]
9,375
@Override public void run() { logger.info("START ZookeeperRiverLogic: " + client.toString()); // TODO Your code.. }
@Override public void run() { logger.info("START ZookeeperRiverLogic: " + client.toString()); }
@override public void run() { logger.info("start zookeeperriverlogic: " + client.tostring()); }
xingxiudong/elasticsearch-zkdiscovery
[ 0, 1, 0, 0 ]
25,770
public void testToInternal() throws Exception { assertFormatParsed("1995-12-31T23:59:59.999", "1995-12-31T23:59:59.999666Z"); assertFormatParsed("1995-12-31T23:59:59.999", "1995-12-31T23:59:59.999Z"); assertFormatParsed("1995-12-31T23:59:59.99", "1995-12-31T23:59:59.99Z"); assertFormatParsed("1995-12-31...
public void testToInternal() throws Exception { assertFormatParsed("1995-12-31T23:59:59.999", "1995-12-31T23:59:59.999666Z"); assertFormatParsed("1995-12-31T23:59:59.999", "1995-12-31T23:59:59.999Z"); assertFormatParsed("1995-12-31T23:59:59.99", "1995-12-31T23:59:59.99Z"); assertFormatParsed("1995-12-31...
public void testtointernal() throws exception { assertformatparsed("1995-12-31t23:59:59.999", "1995-12-31t23:59:59.999666z"); assertformatparsed("1995-12-31t23:59:59.999", "1995-12-31t23:59:59.999z"); assertformatparsed("1995-12-31t23:59:59.99", "1995-12-31t23:59:59.99z"); assertformatparsed("1995-12-31t23:59:59.9", "1...
yida-lxw/solr-5.3.1
[ 0, 0, 0, 1 ]
33,993
private static void checkTypeCompatibility( @NotNull ExpressionTypingContext context, @Nullable JetType type, @NotNull JetType subjectType, @NotNull JetElement reportErrorOn ) { // TODO : Take smart casts into account? if (type == null) { r...
private static void checkTypeCompatibility( @NotNull ExpressionTypingContext context, @Nullable JetType type, @NotNull JetType subjectType, @NotNull JetElement reportErrorOn ) { if (type == null) { return; } if (isIntersecti...
private static void checktypecompatibility( @notnull expressiontypingcontext context, @nullable jettype type, @notnull jettype subjecttype, @notnull jetelement reporterroron ) { if (type == null) { return; } if (isintersectionempty(type, subjecttype)) { context.trace.report(incompatible_types.on(reporterroron, type, su...
zarechenskiy/kotlin
[ 1, 0, 0, 0 ]
17,632
private void readPreference(String file, AndroidView root, Integer preferenceId) { Document doc; try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(file); } catch (Exception ex) { ...
private void readPreference(String file, AndroidView root, Integer preferenceId) { Document doc; try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(file); } catch (Exception ex) { ...
private void readpreference(string file, androidview root, integer preferenceid) { document doc; try { documentbuilderfactory dbfactory = documentbuilderfactory.newinstance(); documentbuilder dbuilder = dbfactory.newdocumentbuilder(); doc = dbuilder.parse(file); } catch (exception ex) { throw new runtimeexception(ex); ...
ttincs/guibat
[ 0, 0, 1, 0 ]
17,634
private void resolveIncludes(String resRoot, HashMap<Integer, String> nameMap, HashMap<Integer, AndroidView> viewMap, boolean isSys) { HashMap<String, AndroidView> name2View = Maps.newHashMap(); for (Map.Entry<Integer, String> entry : nameMap.entrySet()) { String name = entr...
private void resolveIncludes(String resRoot, HashMap<Integer, String> nameMap, HashMap<Integer, AndroidView> viewMap, boolean isSys) { HashMap<String, AndroidView> name2View = Maps.newHashMap(); for (Map.Entry<Integer, String> entry : nameMap.entrySet()) { String name = entr...
private void resolveincludes(string resroot, hashmap<integer, string> namemap, hashmap<integer, androidview> viewmap, boolean issys) { hashmap<string, androidview> name2view = maps.newhashmap(); for (map.entry<integer, string> entry : namemap.entryset()) { string name = entry.getvalue(); androidview view = viewmap.get(...
ttincs/guibat
[ 1, 0, 0, 0 ]
17,635
private void readLayout(String file, AndroidView root, boolean isSys) { Document doc; try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); dbFactory.setNamespaceAware(true); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(file); ...
private void readLayout(String file, AndroidView root, boolean isSys) { Document doc; try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); dbFactory.setNamespaceAware(true); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(file); ...
private void readlayout(string file, androidview root, boolean issys) { document doc; try { documentbuilderfactory dbfactory = documentbuilderfactory.newinstance(); dbfactory.setnamespaceaware(true); documentbuilder dbuilder = dbfactory.newdocumentbuilder(); doc = dbuilder.parse(file); } catch (exception ex) { throw ne...
ttincs/guibat
[ 1, 0, 1, 0 ]
17,637
private void readMenu(String file, AndroidView root, boolean isSys) { Document doc; try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); dbFactory.setNamespaceAware(true); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(file); ...
private void readMenu(String file, AndroidView root, boolean isSys) { Document doc; try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); dbFactory.setNamespaceAware(true); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(file); ...
private void readmenu(string file, androidview root, boolean issys) { document doc; try { documentbuilderfactory dbfactory = documentbuilderfactory.newinstance(); dbfactory.setnamespaceaware(true); documentbuilder dbuilder = dbfactory.newdocumentbuilder(); doc = dbuilder.parse(file); } catch (exception ex) { throw new ...
ttincs/guibat
[ 1, 0, 1, 0 ]
34,021
public static Color getColorByName(String colorName) { switch (colorName.toLowerCase()) { case COLOR_BLUE: return Color.blue; case COLOR_CYAN: return Color.cyan; case COLOR_DARKGRAY: case COLOR_DARKGREY: return Color.darkGray; case COLO...
public static Color getColorByName(String colorName) { switch (colorName.toLowerCase()) { case COLOR_BLUE: return Color.blue; case COLOR_CYAN: return Color.cyan; case COLOR_DARKGRAY: case COLOR_DARKGREY: return Color.darkGray; case COLO...
public static color getcolorbyname(string colorname) { switch (colorname.tolowercase()) { case color_blue: return color.blue; case color_cyan: return color.cyan; case color_darkgray: case color_darkgrey: return color.darkgray; case color_gray: case color_grey: return color.gray; case color_lightgray: case color_lightgr...
yaohuizhou/attpg
[ 1, 0, 0, 0 ]
34,026
public View getView(int position, View convertView, ViewGroup parent) { mView = convertView; if (mView == null) { LayoutInflater viewInflator; viewInflator = LayoutInflater.from(mContext); mView = viewInflator.inflate(R.layout.adapter_category_tile, null);...
public View getView(int position, View convertView, ViewGroup parent) { mView = convertView; if (mView == null) { LayoutInflater viewInflator; viewInflator = LayoutInflater.from(mContext); mView = viewInflator.inflate(R.layout.adapter_category_tile, null);...
public view getview(int position, view convertview, viewgroup parent) { mview = convertview; if (mview == null) { layoutinflater viewinflator; viewinflator = layoutinflater.from(mcontext); mview = viewinflator.inflate(r.layout.adapter_category_tile, null); } mcaptiontextview = (textview) mview.findviewbyid(r.id.month_a...
zonnie/Coins
[ 0, 1, 0, 0 ]
9,519
protected static Response scoreOne(Frame frame, Model score_model) { water.ModelMetrics metrics = water.ModelMetrics.getFromDKV(score_model, frame); if (null == metrics) { // have to compute water.util.Log.debug("Cache miss: computing ModelMetrics. . ."); long before = System.currentTimeMillis...
protected static Response scoreOne(Frame frame, Model score_model) { water.ModelMetrics metrics = water.ModelMetrics.getFromDKV(score_model, frame); if (null == metrics) { water.util.Log.debug("Cache miss: computing ModelMetrics. . ."); long before = System.currentTimeMillis(); Frame pre...
protected static response scoreone(frame frame, model score_model) { water.modelmetrics metrics = water.modelmetrics.getfromdkv(score_model, frame); if (null == metrics) { water.util.log.debug("cache miss: computing modelmetrics. . ."); long before = system.currenttimemillis(); frame predictions = score_model.score(fra...
vkuznet/h2o
[ 1, 0, 0, 0 ]
17,712
public Range<Token> getRange(ByteBuffer key) { // TODO: naive linear search of the token map Token<?> t = partitioner.getToken(key); for (Range<Token> range : rangeMap.keySet()) if (range.contains(t)) return range; throw new RuntimeException("Invalid token...
public Range<Token> getRange(ByteBuffer key) { Token<?> t = partitioner.getToken(key); for (Range<Token> range : rangeMap.keySet()) if (range.contains(t)) return range; throw new RuntimeException("Invalid token information returned by describe_ring: " + ra...
public range<token> getrange(bytebuffer key) { token<?> t = partitioner.gettoken(key); for (range<token> range : rangemap.keyset()) if (range.contains(t)) return range; throw new runtimeexception("invalid token information returned by describe_ring: " + rangemap); }
tadeegan/eiger-application-aware
[ 0, 1, 0, 0 ]
17,718
private void populateSignatureNames() { if (acroForm == null) { return; } List<Object[]> sorter = new ArrayList<>(); for (Map.Entry<String, PdfFormField> entry : acroForm.getFormFields().entrySet()) { PdfFormField field = entry.getValue(); PdfDictionar...
private void populateSignatureNames() { if (acroForm == null) { return; } List<Object[]> sorter = new ArrayList<>(); for (Map.Entry<String, PdfFormField> entry : acroForm.getFormFields().entrySet()) { PdfFormField field = entry.getValue(); PdfDictionar...
private void populatesignaturenames() { if (acroform == null) { return; } list<object[]> sorter = new arraylist<>(); for (map.entry<string, pdfformfield> entry : acroform.getformfields().entryset()) { pdfformfield field = entry.getvalue(); pdfdictionary merged = field.getpdfobject(); if (!pdfname.sig.equals(merged.get(...
tompecina/itext7
[ 0, 1, 0, 0 ]
25,939
public void setEnumsSet(Map<String, Set<Object>> enums) { Preconditions.checkNotNull(enums); areEnumsUpdated = true; Map<String, List<Object>> enumsList = Maps.newHashMap(); //Check that all the given keys are valid Preconditions.checkArgument( configurationSchema.getKeyDescriptor().getFie...
public void setEnumsSet(Map<String, Set<Object>> enums) { Preconditions.checkNotNull(enums); areEnumsUpdated = true; Map<String, List<Object>> enumsList = Maps.newHashMap(); Preconditions.checkArgument( configurationSchema.getKeyDescriptor().getFields().getFields().containsAll(enums.keySet...
public void setenumsset(map<string, set<object>> enums) { preconditions.checknotnull(enums); areenumsupdated = true; map<string, list<object>> enumslist = maps.newhashmap(); preconditions.checkargument( configurationschema.getkeydescriptor().getfields().getfields().containsall(enums.keyset()), "the given map doesn't co...
vijaysbhat/apex-malhar
[ 0, 1, 0, 0 ]
25,940
@SuppressWarnings({"rawtypes", "unchecked"}) public void setEnumsSetComparable(Map<String, Set<Comparable>> enums) { Preconditions.checkNotNull(enums); areEnumsUpdated = true; Map<String, List<Object>> enumsList = Maps.newHashMap(); //Check that all the given keys are valid Preconditions.checkAr...
@SuppressWarnings({"rawtypes", "unchecked"}) public void setEnumsSetComparable(Map<String, Set<Comparable>> enums) { Preconditions.checkNotNull(enums); areEnumsUpdated = true; Map<String, List<Object>> enumsList = Maps.newHashMap(); Preconditions.checkArgument( configurationSchema.getKey...
@suppresswarnings({"rawtypes", "unchecked"}) public void setenumssetcomparable(map<string, set<comparable>> enums) { preconditions.checknotnull(enums); areenumsupdated = true; map<string, list<object>> enumslist = maps.newhashmap(); preconditions.checkargument( configurationschema.getkeydescriptor().getfields().getfiel...
vijaysbhat/apex-malhar
[ 0, 1, 0, 0 ]
25,941
public void setEnumsList(Map<String, List<Object>> enums) { Preconditions.checkNotNull(enums); areEnumsUpdated = true; //Check that all the given keys are valid Preconditions.checkArgument( configurationSchema.getKeyDescriptor().getFields().getFields().containsAll(enums.keySet()), "The...
public void setEnumsList(Map<String, List<Object>> enums) { Preconditions.checkNotNull(enums); areEnumsUpdated = true; Preconditions.checkArgument( configurationSchema.getKeyDescriptor().getFields().getFields().containsAll(enums.keySet()), "The given map doesn't contain valid keys. Val...
public void setenumslist(map<string, list<object>> enums) { preconditions.checknotnull(enums); areenumsupdated = true; preconditions.checkargument( configurationschema.getkeydescriptor().getfields().getfields().containsall(enums.keyset()), "the given map doesn't contain valid keys. valid keys are %s and the provided ke...
vijaysbhat/apex-malhar
[ 0, 1, 0, 0 ]
1,407
public ByteBuffer allocateBufferIfNeeded() { ByteBuffer buffer = getCurrentBuffer(); if (buffer != null && buffer.hasRemaining()) { return buffer; } if (currentBufferIndex < bufferList.size() - 1) { buffer = getBuffer(currentBufferIndex + 1); } else { buffer = ByteBuffer.allocate(b...
public ByteBuffer allocateBufferIfNeeded() { ByteBuffer buffer = getCurrentBuffer(); if (buffer != null && buffer.hasRemaining()) { return buffer; } if (currentBufferIndex < bufferList.size() - 1) { buffer = getBuffer(currentBufferIndex + 1); } else { buffer = ByteBuffer.allocate(b...
public bytebuffer allocatebufferifneeded() { bytebuffer buffer = getcurrentbuffer(); if (buffer != null && buffer.hasremaining()) { return buffer; } if (currentbufferindex < bufferlist.size() - 1) { buffer = getbuffer(currentbufferindex + 1); } else { buffer = bytebuffer.allocate(buffersize); bufferlist.add(buffer); } ...
wangfanming/hadoop
[ 1, 0, 0, 0 ]
34,186
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_map); initViews(); Statistics.INSTANCE.trackConnectionState(); if (MwmApplication.get().nativeIsBenchmarking()) Utils.keepScreenOn(true, getWindow()); ...
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_map); initViews(); Statistics.INSTANCE.trackConnectionState(); if (MwmApplication.get().nativeIsBenchmarking()) Utils.keepScreenOn(true, getWindow()); ...
@override public void oncreate(@nullable bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_map); initviews(); statistics.instance.trackconnectionstate(); if (mwmapplication.get().nativeisbenchmarking()) utils.keepscreenon(true, getwindow()); framework.nativesetroutinglist...
yanncoupin/omim
[ 1, 0, 0, 0 ]
34,226
private boolean isEmailValid(String email) { //TODO: Replace this with your own logic return email.contains("@"); }
private boolean isEmailValid(String email) { return email.contains("@"); }
private boolean isemailvalid(string email) { return email.contains("@"); }
xuanliao/MVVM_Samples
[ 0, 1, 0, 0 ]
34,227
private boolean isPasswordValid(String password) { //TODO: Replace this with your own logic return password.length() > 4; }
private boolean isPasswordValid(String password) { return password.length() > 4; }
private boolean ispasswordvalid(string password) { return password.length() > 4; }
xuanliao/MVVM_Samples
[ 0, 1, 0, 0 ]
34,249
@Override public void onStart() { super.onStart(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client.connect(); Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Sl...
@Override public void onStart() { super.onStart(); client.connect(); Action viewAction = Action.newAction( Action.TYPE_VIEW, "Sliding Page", Uri.parse("http://host/path"), Uri.parse("android-app://com.kaidongyuan.app.basemodule.widget.slidingmenu.activity/http/host/path") );...
@override public void onstart() { super.onstart(); client.connect(); action viewaction = action.newaction( action.type_view, "sliding page", uri.parse("http://host/path"), uri.parse("android-app://com.kaidongyuan.app.basemodule.widget.slidingmenu.activity/http/host/path") ); appindex.appindexapi.start(client, viewactio...
wangwenwang/sfkc-driver-android
[ 1, 1, 0, 0 ]
34,250
@Override public void onStop() { super.onStop(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Sliding Page", // TODO: ...
@Override public void onStop() { super.onStop(); Action viewAction = Action.newAction( Action.TYPE_VIEW, "Sliding Page", Uri.parse("http://host/path"), Uri.parse("android-app://com.kaidongyuan.app.basemodule.widget.slidingmenu.activity/http/host/path") ); AppIndex.AppIndexAp...
@override public void onstop() { super.onstop(); action viewaction = action.newaction( action.type_view, "sliding page", uri.parse("http://host/path"), uri.parse("android-app://com.kaidongyuan.app.basemodule.widget.slidingmenu.activity/http/host/path") ); appindex.appindexapi.end(client, viewaction); client.disconnect(...
wangwenwang/sfkc-driver-android
[ 1, 1, 0, 0 ]
26,213
@Test public void canImportTheCorrectNumberOfRecords() throws Throwable { process(shakParser, shakDao, "data/sks/SHAKCOMPLETE.TXT"); // FIXME: These record counts are only correct iff if duplicate keys are disregarted. // This is unfortunate. Keys are currently only considered based their SK...
@Test public void canImportTheCorrectNumberOfRecords() throws Throwable { process(shakParser, shakDao, "data/sks/SHAKCOMPLETE.TXT"); assertEquals(1017, jdbc.queryForInt("SELECT COUNT(*) FROM class_shak WHERE Organisationstype = 'Sygehus'")); assertEquals(18411, jdbc.q...
@test public void canimportthecorrectnumberofrecords() throws throwable { process(shakparser, shakdao, "data/sks/shakcomplete.txt"); assertequals(1017, jdbc.queryforint("select count(*) from class_shak where organisationstype = 'sygehus'")); assertequals(18411, jdbc.queryforint("select count(*) from class_shak where or...
trifork/HAIBA-FGRImporter
[ 0, 0, 1, 0 ]
26,228
public SolrQueryResponse search(DataverseRequest dataverseRequest, Dataverse dataverse, String query, List<String> filterQueries, String sortField, String sortOrder, int paginationStart, boolean onlyDatatRelatedToMe, int numResultsPerPage, boolean retrieveEntities) throws SearchException { if (paginationStart <...
public SolrQueryResponse search(DataverseRequest dataverseRequest, Dataverse dataverse, String query, List<String> filterQueries, String sortField, String sortOrder, int paginationStart, boolean onlyDatatRelatedToMe, int numResultsPerPage, boolean retrieveEntities) throws SearchException { if (paginationStart <...
public solrqueryresponse search(dataverserequest dataverserequest, dataverse dataverse, string query, list<string> filterqueries, string sortfield, string sortorder, int paginationstart, boolean onlydatatrelatedtome, int numresultsperpage, boolean retrieveentities) throws searchexception { if (paginationstart < 0) { th...
tkmonson/dataverse
[ 1, 1, 1, 0 ]
1,664
public AccumulatedAnimationValue getAccumulatedAnimationValue(AdditiveAnimation animation) { // TODO: is there any way to make this `get()` faster? AccumulatedAnimationValue accumulatedAnimationValue = accumulatedAnimationValues.get(animation); if(accumulatedAnimationValue != null) { ...
public AccumulatedAnimationValue getAccumulatedAnimationValue(AdditiveAnimation animation) { AccumulatedAnimationValue accumulatedAnimationValue = accumulatedAnimationValues.get(animation); if(accumulatedAnimationValue != null) { return accumulatedAnimationValue; } ac...
public accumulatedanimationvalue getaccumulatedanimationvalue(additiveanimation animation) { accumulatedanimationvalue accumulatedanimationvalue = accumulatedanimationvalues.get(animation); if(accumulatedanimationvalue != null) { return accumulatedanimationvalue; } accumulatedanimationvalue = new accumulatedanimationva...
wirecube/android_additive_animations
[ 1, 0, 0, 0 ]
26,242
public DialerCall getCallWithState(int state, int positionToFind) { DialerCall retval = null; int position = 0; for (DialerCall call : callById.values()) { if (call.getState() == state) { if (position >= positionToFind) { retval = call; break; } else { pos...
public DialerCall getCallWithState(int state, int positionToFind) { DialerCall retval = null; int position = 0; for (DialerCall call : callById.values()) { if (call.getState() == state) { if (position >= positionToFind) { retval = call; break; } else { pos...
public dialercall getcallwithstate(int state, int positiontofind) { dialercall retval = null; int position = 0; for (dialercall call : callbyid.values()) { if (call.getstate() == state) { if (position >= positiontofind) { retval = call; break; } else { position++; } } } return retval; }
unisoc-android/android_packages_apps_Dialer
[ 1, 0, 0, 0 ]
18,099
private void process(String str) { QuotedStringTokenizer tok = new QuotedStringTokenizer(str); String cmd = tok.nextToken().trim(); String retstr = ""; if (cmd.equals("no-op")) { // Does nothing } // syntax: vnmrjcmd('SQ start [<macro>]') else if (c...
private void process(String str) { QuotedStringTokenizer tok = new QuotedStringTokenizer(str); String cmd = tok.nextToken().trim(); String retstr = ""; if (cmd.equals("no-op")) { } else if (cmd.equals(START)) { mgr.setExecuting(true); ...
private void process(string str) { quotedstringtokenizer tok = new quotedstringtokenizer(str); string cmd = tok.nexttoken().trim(); string retstr = ""; if (cmd.equals("no-op")) { } else if (cmd.equals(start)) { mgr.setexecuting(true); mgr.setpaused(false); } else if (cmd.equals(pause)) { mgr.setexecuting(false); mgr.se...
timburrow/openvnmrj-source
[ 1, 0, 0, 0 ]
1,780
@Override public boolean onTouch(View v, MotionEvent event) { Layout layout = ((TextView) v).getLayout(); if (layout == null) { return false; } int x = (int) event.getX(); int y = (int) event.getY(); int line = layout.getLineForVertical(y); int off...
@Override public boolean onTouch(View v, MotionEvent event) { Layout layout = ((TextView) v).getLayout(); if (layout == null) { return false; } int x = (int) event.getX(); int y = (int) event.getY(); int line = layout.getLineForVertical(y); int off...
@override public boolean ontouch(view v, motionevent event) { layout layout = ((textview) v).getlayout(); if (layout == null) { return false; } int x = (int) event.getx(); int y = (int) event.gety(); int line = layout.getlineforvertical(y); int offset = layout.getoffsetforhorizontal(line, x); textview tv = (textview) v...
zhe525069676/WeiBoLayout
[ 0, 0, 1, 0 ]
34,679
@Override public Subscriber getSubscriber(Set<? extends ConfigKey<?>> configKeys) { Set<ConfigKey<ConfigInstance>> subscriptionKeys = new HashSet<>(); for(ConfigKey<?> key: configKeys) { @SuppressWarnings("unchecked") // ConfigKey is defined as <CONFIGCLASS extends ConfigInstance> ...
@Override public Subscriber getSubscriber(Set<? extends ConfigKey<?>> configKeys) { Set<ConfigKey<ConfigInstance>> subscriptionKeys = new HashSet<>(); for(ConfigKey<?> key: configKeys) { @SuppressWarnings("unchecked") ConfigKey<ConfigInstance> invariant = (ConfigKey<ConfigIns...
@override public subscriber getsubscriber(set<? extends configkey<?>> configkeys) { set<configkey<configinstance>> subscriptionkeys = new hashset<>(); for(configkey<?> key: configkeys) { @suppresswarnings("unchecked") configkey<configinstance> invariant = (configkey<configinstance>) key; subscriptionkeys.add(invariant)...
yehzu/vespa
[ 0, 0, 0, 1 ]
34,680
@Override public void reloadActiveSubscribers(long generation) { testGeneration = Optional.of(generation); List<CloudSubscriber> subscribers = new ArrayList<>(activeSubscribers.keySet()); subscribers.forEach(s -> s.subscriber.reload(generation)); }
@Override public void reloadActiveSubscribers(long generation) { testGeneration = Optional.of(generation); List<CloudSubscriber> subscribers = new ArrayList<>(activeSubscribers.keySet()); subscribers.forEach(s -> s.subscriber.reload(generation)); }
@override public void reloadactivesubscribers(long generation) { testgeneration = optional.of(generation); list<cloudsubscriber> subscribers = new arraylist<>(activesubscribers.keyset()); subscribers.foreach(s -> s.subscriber.reload(generation)); }
yehzu/vespa
[ 0, 0, 0, 1 ]
1,975
@Override protected void doGetWithSubjectAndActor(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // TODO filtering??? request.getParameter("filter"); // filter=1,2,3 /groups/*/* Map<String,Object> structure = generateStructure(getBroker(), Brok...
@Override protected void doGetWithSubjectAndActor(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Map<String,Object> structure = generateStructure(getBroker(), Broker.class); sendJsonResponse(structure, request, response); }
@override protected void dogetwithsubjectandactor(httpservletrequest request, httpservletresponse response) throws ioexception, servletexception { map<string,object> structure = generatestructure(getbroker(), broker.class); sendjsonresponse(structure, request, response); }
vbohinc/qpid-java
[ 0, 1, 0, 0 ]
2,003
@Test public void testTest1() throws IOException { final InputEntityReader reader = createReader( new TimestampSpec("timestamp", "auto", null), new DimensionsSpec(DimensionsSpec.getDefaultSchemas(ImmutableList.of("col1", "col2"))), new OrcInputFormat(null, null, new Configuration()), ...
@Test public void testTest1() throws IOException { final InputEntityReader reader = createReader( new TimestampSpec("timestamp", "auto", null), new DimensionsSpec(DimensionsSpec.getDefaultSchemas(ImmutableList.of("col1", "col2"))), new OrcInputFormat(null, null, new Configuration()), ...
@test public void testtest1() throws ioexception { final inputentityreader reader = createreader( new timestampspec("timestamp", "auto", null), new dimensionsspec(dimensionsspec.getdefaultschemas(immutablelist.of("col1", "col2"))), new orcinputformat(null, null, new configuration()), "example/test_1.orc" ); try (closea...
weishiuntsai/druid
[ 0, 0, 0, 0 ]
2,004
@Test public void testTest2() throws IOException { final InputFormat inputFormat = new OrcInputFormat( new JSONPathSpec( true, Collections.singletonList(new JSONPathFieldSpec(JSONPathFieldType.PATH, "col7-subcol7", "$.col7.subcol7")) ), null, new Configura...
@Test public void testTest2() throws IOException { final InputFormat inputFormat = new OrcInputFormat( new JSONPathSpec( true, Collections.singletonList(new JSONPathFieldSpec(JSONPathFieldType.PATH, "col7-subcol7", "$.col7.subcol7")) ), null, new Configura...
@test public void testtest2() throws ioexception { final inputformat inputformat = new orcinputformat( new jsonpathspec( true, collections.singletonlist(new jsonpathfieldspec(jsonpathfieldtype.path, "col7-subcol7", "$.col7.subcol7")) ), null, new configuration() ); final inputentityreader reader = createreader( new tim...
weishiuntsai/druid
[ 0, 0, 0, 0 ]
2,005
@Test public void testOrcFile11Format() throws IOException { final OrcInputFormat inputFormat = new OrcInputFormat( new JSONPathSpec( true, ImmutableList.of( new JSONPathFieldSpec(JSONPathFieldType.PATH, "struct_list_struct_int", "$.middle.list[1].int1"), ...
@Test public void testOrcFile11Format() throws IOException { final OrcInputFormat inputFormat = new OrcInputFormat( new JSONPathSpec( true, ImmutableList.of( new JSONPathFieldSpec(JSONPathFieldType.PATH, "struct_list_struct_int", "$.middle.list[1].int1"), ...
@test public void testorcfile11format() throws ioexception { final orcinputformat inputformat = new orcinputformat( new jsonpathspec( true, immutablelist.of( new jsonpathfieldspec(jsonpathfieldtype.path, "struct_list_struct_int", "$.middle.list[1].int1"), new jsonpathfieldspec(jsonpathfieldtype.path, "struct_list_struc...
weishiuntsai/druid
[ 0, 0, 0, 0 ]
2,006
@Test public void testOrcSplitElim() throws IOException { final InputEntityReader reader = createReader( new TimestampSpec("ts", "millis", null), new DimensionsSpec(null), new OrcInputFormat(new JSONPathSpec(true, null), null, new Configuration()), "example/orc_split_elim.orc" ...
@Test public void testOrcSplitElim() throws IOException { final InputEntityReader reader = createReader( new TimestampSpec("ts", "millis", null), new DimensionsSpec(null), new OrcInputFormat(new JSONPathSpec(true, null), null, new Configuration()), "example/orc_split_elim.orc" ...
@test public void testorcsplitelim() throws ioexception { final inputentityreader reader = createreader( new timestampspec("ts", "millis", null), new dimensionsspec(null), new orcinputformat(new jsonpathspec(true, null), null, new configuration()), "example/orc_split_elim.orc" ); try (closeableiterator<inputrow> iterat...
weishiuntsai/druid
[ 0, 0, 0, 0 ]
2,007
@Test public void testDate1900() throws IOException { final InputEntityReader reader = createReader( new TimestampSpec("time", "millis", null), new DimensionsSpec(null, Collections.singletonList("time"), null), new OrcInputFormat(new JSONPathSpec(true, null), null, new Configuration()), ...
@Test public void testDate1900() throws IOException { final InputEntityReader reader = createReader( new TimestampSpec("time", "millis", null), new DimensionsSpec(null, Collections.singletonList("time"), null), new OrcInputFormat(new JSONPathSpec(true, null), null, new Configuration()), ...
@test public void testdate1900() throws ioexception { final inputentityreader reader = createreader( new timestampspec("time", "millis", null), new dimensionsspec(null, collections.singletonlist("time"), null), new orcinputformat(new jsonpathspec(true, null), null, new configuration()), "example/testorcfile.testdate190...
weishiuntsai/druid
[ 0, 0, 0, 0 ]
2,008
@Test public void testDate2038() throws IOException { final InputEntityReader reader = createReader( new TimestampSpec("time", "millis", null), new DimensionsSpec(null, Collections.singletonList("time"), null), new OrcInputFormat(new JSONPathSpec(true, null), null, new Configuration()), ...
@Test public void testDate2038() throws IOException { final InputEntityReader reader = createReader( new TimestampSpec("time", "millis", null), new DimensionsSpec(null, Collections.singletonList("time"), null), new OrcInputFormat(new JSONPathSpec(true, null), null, new Configuration()), ...
@test public void testdate2038() throws ioexception { final inputentityreader reader = createreader( new timestampspec("time", "millis", null), new dimensionsspec(null, collections.singletonlist("time"), null), new orcinputformat(new jsonpathspec(true, null), null, new configuration()), "example/testorcfile.testdate203...
weishiuntsai/druid
[ 0, 0, 0, 0 ]
34,800
public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { // dismiss disable(true); // of course the irony is that this redirect won't work return HttpResponses.redirectViaContextPath("/manage"); } else { return new HttpRedir...
public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return new HttpRedirect("https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+says+my+re...
public httpresponse doact(@queryparameter string no) throws ioexception { if(no!=null) { disable(true); return httpresponses.redirectviacontextpath("/manage"); } else { return new httpredirect("https://wiki.jenkins-ci.org/display/jenkins/jenkins+says+my+reverse+proxy+setup+is+broken"); } }
wasimdocker/hudson
[ 0, 0, 1, 0 ]
18,435
private void bnt0ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnt0ActionPerformed // TODO add your handling code here: // JOptionPane.showMessageDialog(null,evt.paramString()); if (isBtigual() ){ setBtigual(false); textResult.setText(""); ...
private void bnt0ActionPerformed(java.awt.event.ActionEvent evt) { if (isBtigual() ){ setBtigual(false); textResult.setText(""); this.vtmp=0; textResult.setText(textResult.getText() + evt.getActionCommand()); textResult.requestFocusInWindow(); ...
private void bnt0actionperformed(java.awt.event.actionevent evt) { if (isbtigual() ){ setbtigual(false); textresult.settext(""); this.vtmp=0; textresult.settext(textresult.gettext() + evt.getactioncommand()); textresult.requestfocusinwindow(); }else{ textresult.settext(textresult.gettext() + evt.getactioncommand()); te...
vinte2/Calc
[ 0, 1, 0, 0 ]
18,533
private void showClearIcon(boolean show) { // TODO: should probably use setVisibility method, but seems to not working. if (clearDrawable != null) { clearDrawable.setAlpha(show ? 255 : 0); } }
private void showClearIcon(boolean show) { if (clearDrawable != null) { clearDrawable.setAlpha(show ? 255 : 0); } }
private void showclearicon(boolean show) { if (cleardrawable != null) { cleardrawable.setalpha(show ? 255 : 0); } }
wellplayedstudios/twilio-video-app-android
[ 1, 0, 0, 0 ]
18,549
private Map<String, Object> validateJwt(String token, JWTPolicyBean config) throws ExpiredJwtException, PrematureJwtException, MalformedJwtException, SignatureException, InvalidClaimException { // check if we have to use jwk(s) if (urlValidator.isValid(config.getSigningKeyString())){ ...
private Map<String, Object> validateJwt(String token, JWTPolicyBean config) throws ExpiredJwtException, PrematureJwtException, MalformedJwtException, SignatureException, InvalidClaimException { if (urlValidator.isValid(config.getSigningKeyString())){ if (provider == null){ ...
private map<string, object> validatejwt(string token, jwtpolicybean config) throws expiredjwtexception, prematurejwtexception, malformedjwtexception, signatureexception, invalidclaimexception { if (urlvalidator.isvalid(config.getsigningkeystring())){ if (provider == null){ provider = getnewjwksprovider(config.getsignin...
tevosouza/apiman-plugins
[ 0, 1, 0, 0 ]
18,600
public PrismObject<ShadowType> getResourceObject(ProvisioningContext ctx, Collection<? extends ResourceAttribute<?>> identifiers, boolean fetchAssociations, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationExcep...
public PrismObject<ShadowType> getResourceObject(ProvisioningContext ctx, Collection<? extends ResourceAttribute<?>> identifiers, boolean fetchAssociations, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationExcep...
public prismobject<shadowtype> getresourceobject(provisioningcontext ctx, collection<? extends resourceattribute<?>> identifiers, boolean fetchassociations, operationresult parentresult) throws objectnotfoundexception, communicationexception, schemaexception, configurationexception, securityviolationexception, genericc...
valtri/midpoint
[ 1, 0, 0, 0 ]
18,601
public PrismObject<ShadowType> locateResourceObject(ProvisioningContext ctx, Collection<? extends ResourceAttribute<?>> identifiers, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, GenericConnectorException,...
public PrismObject<ShadowType> locateResourceObject(ProvisioningContext ctx, Collection<? extends ResourceAttribute<?>> identifiers, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, GenericConnectorException,...
public prismobject<shadowtype> locateresourceobject(provisioningcontext ctx, collection<? extends resourceattribute<?>> identifiers, operationresult parentresult) throws objectnotfoundexception, communicationexception, schemaexception, configurationexception, securityviolationexception, genericconnectorexception, expre...
valtri/midpoint
[ 1, 0, 0, 0 ]
18,602
private void updateQuantum(ProvisioningContext ctx, ConnectorInstance connectorUsedForOperation, AsynchronousOperationResult aResult, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, ExpressionEvaluationException { ConnectorInstance readCon...
private void updateQuantum(ProvisioningContext ctx, ConnectorInstance connectorUsedForOperation, AsynchronousOperationResult aResult, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, ExpressionEvaluationException { ConnectorInstance readCon...
private void updatequantum(provisioningcontext ctx, connectorinstance connectorusedforoperation, asynchronousoperationresult aresult, operationresult parentresult) throws objectnotfoundexception, schemaexception, communicationexception, configurationexception, expressionevaluationexception { connectorinstance readconne...
valtri/midpoint
[ 1, 0, 0, 0 ]
18,608
public List<Change> fetchChanges(ProvisioningContext ctx, PrismProperty<?> lastToken, OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, GenericFrameworkException, ObjectNotFoundException, ExpressionEvaluationException { Validate.not...
public List<Change> fetchChanges(ProvisioningContext ctx, PrismProperty<?> lastToken, OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, GenericFrameworkException, ObjectNotFoundException, ExpressionEvaluationException { Validate.not...
public list<change> fetchchanges(provisioningcontext ctx, prismproperty<?> lasttoken, operationresult parentresult) throws schemaexception, communicationexception, configurationexception, securityviolationexception, genericframeworkexception, objectnotfoundexception, expressionevaluationexception { validate.notnull(par...
valtri/midpoint
[ 1, 0, 0, 0 ]
10,424
@Override public void run() { if (TokenList.this.cancel.get()) { return ; } topLevel = TokenHierarchy.get(doc).tokenSequence(); topLevelIsJava = topLevel.language() == JavaTokenId.language(); if (topLevelIsJa...
@Override public void run() { if (TokenList.this.cancel.get()) { return ; } topLevel = TokenHierarchy.get(doc).tokenSequence(); topLevelIsJava = topLevel.language() == JavaTokenId.language(); if (topLevelIsJa...
@override public void run() { if (tokenlist.this.cancel.get()) { return ; } toplevel = tokenhierarchy.get(doc).tokensequence(); toplevelisjava = toplevel.language() == javatokenid.language(); if (toplevelisjava) { ts = toplevel; ts.movestart(); ts.movenext(); } }
timfel/netbeans
[ 0, 0, 1, 0 ]
18,754
@RequestMapping(value = "/products", method=RequestMethod.GET) @ResponseBody public ReadableProductList getFiltered( @RequestParam(value = "lang", required=false) String lang, @RequestParam(value = "category", required=false) Long category, @RequestParam(value = "manufacturer", required=false) Long manufac...
@RequestMapping(value = "/products", method=RequestMethod.GET) @ResponseBody public ReadableProductList getFiltered( @RequestParam(value = "lang", required=false) String lang, @RequestParam(value = "category", required=false) Long category, @RequestParam(value = "manufacturer", required=false) Long manufac...
@requestmapping(value = "/products", method=requestmethod.get) @responsebody public readableproductlist getfiltered( @requestparam(value = "lang", required=false) string lang, @requestparam(value = "category", required=false) long category, @requestparam(value = "manufacturer", required=false) long manufacturer, @reque...
wxlfrank/shopizer
[ 0, 1, 0, 0 ]
10,651
public synchronized void updateState(ServiceStateProcessor<T> processor) { // String transactionId = null; // try { // javax.transaction.TransactionManager transactionManager = com.arjuna.ats.jta.TransactionManager.transactionManager(); // TransactionImple transaction = (TransactionImple) transactionManager.getTr...
public synchronized void updateState(ServiceStateProcessor<T> processor) { BasicAction currentAction = ThreadActionData.currentAction(); if (currentAction == null) return; String transactionId = ThreadActionData.currentAction().get_uid().toString(); if (transactionId == null) return; while (isLocke...
public synchronized void updatestate(servicestateprocessor<t> processor) { basicaction currentaction = threadactiondata.currentaction(); if (currentaction == null) return; string transactionid = threadactiondata.currentaction().get_uid().tostring(); if (transactionid == null) return; while (islocked()) { try { wait(); ...
tfisher1226/ARIES
[ 1, 1, 0, 0 ]
10,652
public synchronized void execute(ServiceStateProcessor<T> processor, String transactionId) { // we cannot proceed while a (another) prepare is in progress while (isLocked()) { try { wait(); } catch (InterruptedException e) { // ignore } } T derivedState = getDerivedState(transactionId); if (d...
public synchronized void execute(ServiceStateProcessor<T> processor, String transactionId) { while (isLocked()) { try { wait(); } catch (InterruptedException e) { } } T derivedState = getDerivedState(transactionId); if (derivedState != null) { if (!processor.validateState(derivedState)) { ...
public synchronized void execute(servicestateprocessor<t> processor, string transactionid) { while (islocked()) { try { wait(); } catch (interruptedexception e) { } } t derivedstate = getderivedstate(transactionid); if (derivedstate != null) { if (!processor.validatestate(derivedstate)) { throw new webserviceexception(...
tfisher1226/ARIES
[ 0, 1, 0, 0 ]
2,461
private void startIce4j(BundleContext bundleContext, ConfigurationService cfg) { // TODO Packet logging for ice4j is not supported at this time. StunStack.setPacketLogger(null); // Make all ice4j properties system properties. if (cfg != null) { List<String> ice4jPropertyNames = cfg.getPropertyNamesByPrefix("...
private void startIce4j(BundleContext bundleContext, ConfigurationService cfg) { StunStack.setPacketLogger(null); if (cfg != null) { List<String> ice4jPropertyNames = cfg.getPropertyNamesByPrefix("org.ice4j.", false); if (ice4jPropertyNames != null && !ice4jPropertyNames.isEmpty()) { for (String prope...
private void startice4j(bundlecontext bundlecontext, configurationservice cfg) { stunstack.setpacketlogger(null); if (cfg != null) { list<string> ice4jpropertynames = cfg.getpropertynamesbyprefix("org.ice4j.", false); if (ice4jpropertynames != null && !ice4jpropertynames.isempty()) { for (string propertyname : ice4jpro...
yatyanng/jvb
[ 0, 0, 1, 0 ]
10,668
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1) private void registerDisplayListener() { final DisplayManager displayManager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE); final Handler handler = new Handler(Looper.getMainLooper()); displayManager.regist...
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1) private void registerDisplayListener() { final DisplayManager displayManager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE); final Handler handler = new Handler(Looper.getMainLooper()); displayManager.regist...
@requiresapi(api = build.version_codes.jelly_bean_mr1) private void registerdisplaylistener() { final displaymanager displaymanager = (displaymanager) getsystemservice(context.display_service); final handler handler = new handler(looper.getmainlooper()); displaymanager.registerdisplaylistener(mdisplaylistener, handler)...
thereiskeks/HayaiLauncher
[ 0, 0, 0, 0 ]
10,727
private Point getAbsoluteLocation() throws UiGuardException { if(UiGuardSettings.isIECore()){ return getIECoreAbsoluteLocation(); }else if(UiGuardSettings.isChromeCore()){ return getChromeCoreAbsoluteLocation(); }else if(UiGuardSettings.isFirefoxCore()){ return getFireFoxCoreAbsoluteLocation(); }else{ ...
private Point getAbsoluteLocation() throws UiGuardException { if(UiGuardSettings.isIECore()){ return getIECoreAbsoluteLocation(); }else if(UiGuardSettings.isChromeCore()){ return getChromeCoreAbsoluteLocation(); }else if(UiGuardSettings.isFirefoxCore()){ return getFireFoxCoreAbsoluteLocation(); }else{ ...
private point getabsolutelocation() throws uiguardexception { if(uiguardsettings.isiecore()){ return getiecoreabsolutelocation(); }else if(uiguardsettings.ischromecore()){ return getchromecoreabsolutelocation(); }else if(uiguardsettings.isfirefoxcore()){ return getfirefoxcoreabsolutelocation(); }else{ throw new uiguard...
uiguard/uiguard
[ 0, 1, 0, 0 ]
10,867
public static void addJsonToGrid ( OutputStream outputStream, AccessibilityResult accessibilityResult, List<TaskError> scenarioApplicationWarnings, List<TaskError> scenarioApplicationInfo, PathResult pathResult ) throws IOException { var jsonBlock ...
public static void addJsonToGrid ( OutputStream outputStream, AccessibilityResult accessibilityResult, List<TaskError> scenarioApplicationWarnings, List<TaskError> scenarioApplicationInfo, PathResult pathResult ) throws IOException { var jsonBlock ...
public static void addjsontogrid ( outputstream outputstream, accessibilityresult accessibilityresult, list<taskerror> scenarioapplicationwarnings, list<taskerror> scenarioapplicationinfo, pathresult pathresult ) throws ioexception { var jsonblock = new gridjsonblock(); jsonblock.scenarioapplicationinfo = scenarioappli...
vlc/r5
[ 1, 0, 0, 0 ]
2,693
public void testArrayEnumerationWithDataModification() throws CouchbaseLiteException { MutableArray array = new MutableArray(); for (int i = 0; i < 2; i++) array.addValue(i); Iterator<Object> itr = array.iterator(); int count = 0; try { while (itr.hasNext(...
public void testArrayEnumerationWithDataModification() throws CouchbaseLiteException { MutableArray array = new MutableArray(); for (int i = 0; i < 2; i++) array.addValue(i); Iterator<Object> itr = array.iterator(); int count = 0; try { while (itr.hasNext(...
public void testarrayenumerationwithdatamodification() throws couchbaseliteexception { mutablearray array = new mutablearray(); for (int i = 0; i < 2; i++) array.addvalue(i); iterator<object> itr = array.iterator(); int count = 0; try { while (itr.hasnext()) { itr.next(); if (count++ == 0) array.addvalue(2); } fail("ex...
zebra1024/couchbase-lite-android
[ 0, 0, 0, 1 ]
19,120
@GET @Path("updates") public Uni<Collection<World>> updates(@QueryParam("queries") String queries) { return worldRepository.inSession(session -> { // FIXME: not supported // session.setJdbcBatchSize(worlds.size()); session.setFlushMode(FlushMode.MANUAL); ...
@GET @Path("updates") public Uni<Collection<World>> updates(@QueryParam("queries") String queries) { return worldRepository.inSession(session -> { session.setFlushMode(FlushMode.MANUAL); var worlds = randomWorldForRead(session, parseQueryCount(queries)); ...
@get @path("updates") public uni<collection<world>> updates(@queryparam("queries") string queries) { return worldrepository.insession(session -> { session.setflushmode(flushmode.manual); var worlds = randomworldforread(session, parsequerycount(queries)); return worlds.flatmap(worldscollection -> { worldscollection.fore...
tommilligan/FrameworkBenchmarks
[ 0, 0, 1, 0 ]
19,230
public static LocalDefUse fromBundleFragment(Map<String, Object> bundleFragment) { // TODO deserialize the lambda block... return new LocalDefUse(null); }
public static LocalDefUse fromBundleFragment(Map<String, Object> bundleFragment) { return new LocalDefUse(null); }
public static localdefuse frombundlefragment(map<string, object> bundlefragment) { return new localdefuse(null); }
undeadinu/viskell
[ 0, 1, 0, 0 ]
19,238
int getRankInBlock(int rankPosition) { if (rank == null) { return -1; } assert rankPosition == denseRankPosition(rankPosition); int rankIndex = rankPosition >> RANK_BLOCK_BITS; return rankIndex >= rank.size() ? -1 : (int) rank.get(rankIndex); }
int getRankInBlock(int rankPosition) { if (rank == null) { return -1; } assert rankPosition == denseRankPosition(rankPosition); int rankIndex = rankPosition >> RANK_BLOCK_BITS; return rankIndex >= rank.size() ? -1 : (int) rank.get(rankIndex); }
int getrankinblock(int rankposition) { if (rank == null) { return -1; } assert rankposition == denserankposition(rankposition); int rankindex = rankposition >> rank_block_bits; return rankindex >= rank.size() ? -1 : (int) rank.get(rankindex); }
tafgit/ToF-Test
[ 1, 0, 0, 0 ]
2,942
@Override public Boolean visit(CFieldReference pE) { return !alreadyAssigned.contains(pE); }
@Override public Boolean visit(CFieldReference pE) { return !alreadyAssigned.contains(pE); }
@override public boolean visit(cfieldreference pe) { return !alreadyassigned.contains(pe); }
wqythu13/Test
[ 1, 0, 0, 0 ]
3,182
protected List<T> getList(String[] projection, String selection, String[] selectionArgs, String sortOrder, Integer limit) { List<T> rows = new ArrayList<>(); //noinspection TryWithIdenticalCatches try { Cursor c = mCr.query(mUri, projection, selection, s...
protected List<T> getList(String[] projection, String selection, String[] selectionArgs, String sortOrder, Integer limit) { List<T> rows = new ArrayList<>(); try { Cursor c = mCr.query(mUri, projection, selection, selectionArgs, sortOrder); i...
protected list<t> getlist(string[] projection, string selection, string[] selectionargs, string sortorder, integer limit) { list<t> rows = new arraylist<>(); try { cursor c = mcr.query(muri, projection, selection, selectionargs, sortorder); if (c != null) { if (c.movetofirst()) { int i = 0; constructor<t> constructor =...
tladesignz/DNATools
[ 0, 0, 1, 0 ]
3,186
protected List<T> getList(String selection) { return getList(selection, null); }
protected List<T> getList(String selection) { return getList(selection, null); }
protected list<t> getlist(string selection) { return getlist(selection, null); }
tladesignz/DNATools
[ 0, 0, 1, 0 ]
3,187
@SuppressWarnings("unused") protected List<T> getList() { return getList(null); }
@SuppressWarnings("unused") protected List<T> getList() { return getList(null); }
@suppresswarnings("unused") protected list<t> getlist() { return getlist(null); }
tladesignz/DNATools
[ 0, 0, 1, 0 ]
3,192
@SuppressWarnings("unused") protected T get(String[] selectionArgs) { return get(mUniqueRowSelection, selectionArgs); }
@SuppressWarnings("unused") protected T get(String[] selectionArgs) { return get(mUniqueRowSelection, selectionArgs); }
@suppresswarnings("unused") protected t get(string[] selectionargs) { return get(muniquerowselection, selectionargs); }
tladesignz/DNATools
[ 0, 0, 1, 0 ]
19,585
@Override public boolean onPaymentAppCreated(PaymentApp paymentApp) { // Ignores the service worker payment apps in WebLayer until - // TODO(crbug.com/1224420): WebLayer supports Service worker payment apps. return paymentApp.getPaymentAppType() != PaymentAppType.SERVICE_WORKER_APP; }
@Override public boolean onPaymentAppCreated(PaymentApp paymentApp) { return paymentApp.getPaymentAppType() != PaymentAppType.SERVICE_WORKER_APP; }
@override public boolean onpaymentappcreated(paymentapp paymentapp) { return paymentapp.getpaymentapptype() != paymentapptype.service_worker_app; }
zealoussnow/chromium
[ 0, 1, 0, 0 ]
11,432
public String toXml(int indentLevel){ String indent = ""; for (int i = 1; i <= indentLevel; i++) indent = indent + "\t"; String xml = indent + "<MonitorCategory id='" + this.id + "' name='" + this.name + "' priority='" + this.priority + "' status='" + ...
public String toXml(int indentLevel){ String indent = ""; for (int i = 1; i <= indentLevel; i++) indent = indent + "\t"; String xml = indent + "<MonitorCategory id='" + this.id + "' name='" + this.name + "' priority='" + this.priority + "' status='" + ...
public string toxml(int indentlevel){ string indent = ""; for (int i = 1; i <= indentlevel; i++) indent = indent + "\t"; string xml = indent + "<monitorcategory id='" + this.id + "' name='" + this.name + "' priority='" + this.priority + "' status='" + this.status + "' delete_time='" + this.deletetime + "' note='" + thi...
tabneib/petimo
[ 0, 0, 0, 0 ]