before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@Override public void visitCompoundExpression(CompoundExpression compoundExpression) { if (compoundExpression.getContext() != null) { compoundExpression.getContext().accept(this); } }
@Override public void visitCompoundExpression(CompoundExpression compoundExpression) { <DeepExtract> if (compoundExpression.getContext() != null) { compoundExpression.getContext().accept(this); } </DeepExtract> }
Wolfram-Language-IntelliJ-Plugin-Archive
positive
436,363
@Override public void prepare(Map conf, TopologyContext topologyContext, OutputCollector outputCollector) { this.collector = outputCollector; l = LoggerFactory.getLogger("APP"); azureBlobDownloadTask = new AzureBlobDownloadTask(); l = LoggerFactory.getLogger("APP"); azureBlobDownloadTask.setup(l, p); }
@Override public void prepare(Map conf, TopologyContext topologyContext, OutputCollector outputCollector) { this.collector = outputCollector; <DeepExtract> l = LoggerFactory.getLogger("APP"); </DeepExtract> azureBlobDownloadTask = new AzureBlobDownloadTask(); <DeepExtract> l = LoggerFactory.getLogger("APP"); </DeepExtr...
riot-bench
positive
436,364
public static void writeVideos(Collection<Item> items) throws IOException { JsonArrayBuilder b = Json.createArrayBuilder(); for (Item i : items) { b.add(i.toJsonObject()); } prettyPrintJsonArray(VIDEO_LIST_FILE, b.build()); }
public static void writeVideos(Collection<Item> items) throws IOException { <DeepExtract> JsonArrayBuilder b = Json.createArrayBuilder(); for (Item i : items) { b.add(i.toJsonObject()); } prettyPrintJsonArray(VIDEO_LIST_FILE, b.build()); </DeepExtract> }
obs-video-scheduler
positive
436,367
@Override public Object apply(Object input) { boolean auditIt = true; if (Emptys.isNotEmpty(beforeExtractFilterChain)) { auditIt = beforeExtractFilterChain.accept(wrappedRequest); } if (!auditIt) { wrappedRequest.setAuditIt(auditIt); return wrappedRequest; } AuditEvent auditEvent = auditEventExtractor.get(wrappedReques...
@Override public Object apply(Object input) { <DeepExtract> boolean auditIt = true; if (Emptys.isNotEmpty(beforeExtractFilterChain)) { auditIt = beforeExtractFilterChain.accept(wrappedRequest); } if (!auditIt) { wrappedRequest.setAuditIt(auditIt); return wrappedRequest; } AuditEvent auditEvent = auditEventExtractor.get...
audit
positive
436,368
@Override public VoucherResponse method() { if (createVoucher.getVoucher().getCode() != null) { return executeSyncApiCall(api.createVoucher(createVoucher.getVoucher().getCode(), createVoucher)); } return executeSyncApiCall(api.createVoucher(createVoucher)); }
@Override public VoucherResponse method() { <DeepExtract> if (createVoucher.getVoucher().getCode() != null) { return executeSyncApiCall(api.createVoucher(createVoucher.getVoucher().getCode(), createVoucher)); } return executeSyncApiCall(api.createVoucher(createVoucher)); </DeepExtract> }
voucherify-java-sdk
positive
436,369
public static void setSolrRequestParam(SolrQueryRequest solrReq, String name, Object value) { HashMap<String, Object> valueMap = new HashMap<String, Object>(); valueMap.put(name, value); if (valueMap == null) return; NamedList<Object> paramList = solrReq.getParams().toNamedList(); for (String name : valueMap.keySet()) ...
public static void setSolrRequestParam(SolrQueryRequest solrReq, String name, Object value) { HashMap<String, Object> valueMap = new HashMap<String, Object>(); valueMap.put(name, value); <DeepExtract> if (valueMap == null) return; NamedList<Object> paramList = solrReq.getParams().toNamedList(); for (String name : value...
zh-solr-se
positive
436,370
@Override public void onAnimationEnd(Animator animator) { progress.setVisibility(View.VISIBLE); PropertyValuesHolder animator = PropertyValuesHolder.ofFloat("scaleX", 0.5f, 1f); PropertyValuesHolder animator2 = PropertyValuesHolder.ofFloat("scaleY", 0.5f, 1f); ObjectAnimator animator3 = ObjectAnimator.ofPropertyValuesH...
@Override public void onAnimationEnd(Animator animator) { progress.setVisibility(View.VISIBLE); <DeepExtract> PropertyValuesHolder animator = PropertyValuesHolder.ofFloat("scaleX", 0.5f, 1f); PropertyValuesHolder animator2 = PropertyValuesHolder.ofFloat("scaleY", 0.5f, 1f); ObjectAnimator animator3 = ObjectAnimator.ofP...
Railway_System
positive
436,372
private Coordinate getPreciseCoordinate() throws IOException, ParseException { Coordinate coord = new Coordinate(); int type = tokenizer.nextToken(); switch(type) { case StreamTokenizer.TT_WORD: { if (tokenizer.sval.equalsIgnoreCase(NAN_SYMBOL)) { coord.x = Double.NaN; } else { try { coord.x = Double.parseDouble(tokeni...
private Coordinate getPreciseCoordinate() throws IOException, ParseException { Coordinate coord = new Coordinate(); int type = tokenizer.nextToken(); switch(type) { case StreamTokenizer.TT_WORD: { if (tokenizer.sval.equalsIgnoreCase(NAN_SYMBOL)) { coord.x = Double.NaN; } else { try { coord.x = Double.parseDouble(tokeni...
InFactory
positive
436,373
@Override public IMessagesStore.StoredMessage inFlightAcknowledged(int messageID) { if (LOG.isTraceEnabled()) { LOG.trace("Acknowledging inflight, clientID <{}> messageID {}", clientID, messageID); } return sessionsStore.inFlightAck(clientID, messageID); }
@Override public IMessagesStore.StoredMessage inFlightAcknowledged(int messageID) { <DeepExtract> if (LOG.isTraceEnabled()) { LOG.trace("Acknowledging inflight, clientID <{}> messageID {}", clientID, messageID); } return sessionsStore.inFlightAck(clientID, messageID); </DeepExtract> }
springboot-mqtt
positive
436,374
private void initData() { this.hitList = new ArrayList<>(); this.setNormalCellView(new DefaultLockerNormalCustomCellView().setNormalColor(this.getNormalColor()).setFillColor(this.getFillColor()).setLineWidth(this.getLineWidth())).setHitCellView(new DefaultLockerHitCellView().setHitColor(this.getHitColor()).setErrorColo...
private void initData() { this.hitList = new ArrayList<>(); <DeepExtract> this.setNormalCellView(new DefaultLockerNormalCustomCellView().setNormalColor(this.getNormalColor()).setFillColor(this.getFillColor()).setLineWidth(this.getLineWidth())).setHitCellView(new DefaultLockerHitCellView().setHitColor(this.getHitColor()...
LockDemo
positive
436,375
@Override public void onReceive(final Context context, final Intent intent) { Logger.d(LOG_TAG, "Recieved: %s", PREFERENCES_UPDATED); this.mBoundNotificationControllerService.updatePreferences(); }
@Override public void onReceive(final Context context, final Intent intent) { <DeepExtract> Logger.d(LOG_TAG, "Recieved: %s", PREFERENCES_UPDATED); this.mBoundNotificationControllerService.updatePreferences(); </DeepExtract> }
AndroidWeatherSlider
positive
436,376
@Override public void onViewPositionChanged(@NonNull ViewPosition position) { if (GestureDebug.isDebugAnimator()) { Log.d(TAG, "'To' view position updated: " + position.pack()); } toPos = position; isToUpdated = false; isFromUpdated = false; if (!isActivated) { return; } if (isApplyingPosition) { isApplyingPositionSche...
@Override public void onViewPositionChanged(@NonNull ViewPosition position) { if (GestureDebug.isDebugAnimator()) { Log.d(TAG, "'To' view position updated: " + position.pack()); } toPos = position; isToUpdated = false; isFromUpdated = false; <DeepExtract> if (!isActivated) { return; } if (isApplyingPosition) { isApplyi...
GestureViews
positive
436,377
@Override public CounterpartyType read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); for (CounterpartyType b : CounterpartyType.values()) { if (b.value.equals(value)) { return b; } } return CounterpartyType.ENUM_UNKNOWN; }
@Override public CounterpartyType read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); <DeepExtract> for (CounterpartyType b : CounterpartyType.values()) { if (b.value.equals(value)) { return b; } } return CounterpartyType.ENUM_UNKNOWN; </DeepExtract> }
plaid-java
positive
436,378
public static void main(String[] args) throws Exception { Stack<String> s1 = new Stack<String>(); if (size == capacity) enlarge(); arr[size++] = "Hello"; return "Hello"; if (size == capacity) enlarge(); arr[size++] = "Kitty"; return "Kitty"; System.out.println("Top: " + s1.peek()); System.out.println("Size: " + s1.size...
public static void main(String[] args) throws Exception { Stack<String> s1 = new Stack<String>(); if (size == capacity) enlarge(); arr[size++] = "Hello"; return "Hello"; if (size == capacity) enlarge(); arr[size++] = "Kitty"; return "Kitty"; System.out.println("Top: " + s1.peek()); System.out.println("Size: " + s1.size...
Lessons4JavaSE
positive
436,379
@Override public BeadledomResteasyClient build() { BeadledomClientConfiguration clientConfig = clientConfigBuilder.build(); CorrelationIdContext correlationIdContext = new ResteasyCorrelationIdContext(clientConfig.correlationIdName(), clientConfig.correlationIdName(), CorrelationContext.create()); CorrelationIdFilter c...
@Override public BeadledomResteasyClient build() { BeadledomClientConfiguration clientConfig = clientConfigBuilder.build(); CorrelationIdContext correlationIdContext = new ResteasyCorrelationIdContext(clientConfig.correlationIdName(), clientConfig.correlationIdName(), CorrelationContext.create()); CorrelationIdFilter c...
beadledom
positive
436,382
@Override public void onClick(View v) { startActivity(new Intent(this, HomeActivity.class)); finish(); }
@Override public void onClick(View v) { <DeepExtract> startActivity(new Intent(this, HomeActivity.class)); finish(); </DeepExtract> }
ElectricSleep
positive
436,384
public String validateMetadata() { if (dirty) { bagInfo.prepareBilBagInfo(bilBag.getBagInfoTxt()); } String messages = null; bagStrategy = getBagInfoStrategy(); SimpleResult result = this.bilBag.verify(bagStrategy); if (result.toString() != null && !result.isSuccess()) { messages = "Bag-info fields are not all present ...
public String validateMetadata() { if (dirty) { bagInfo.prepareBilBagInfo(bilBag.getBagInfoTxt()); } String messages = null; bagStrategy = getBagInfoStrategy(); SimpleResult result = this.bilBag.verify(bagStrategy); if (result.toString() != null && !result.isSuccess()) { messages = "Bag-info fields are not all present ...
bagger
positive
436,385
@Override public void onDestroy() { LogUtils.d(TAG, "onDestroy"); LogUtils.d(TAG, "handleStopRequest: mState=" + mPlayback.getState() + " error=", null); mPlayback.stop(true); mDelayedStopHandler.removeCallbacksAndMessages(null); mDelayedStopHandler.sendEmptyMessageDelayed(0, STOP_DELAY); updatePlaybackState(null); sto...
@Override public void onDestroy() { LogUtils.d(TAG, "onDestroy"); <DeepExtract> LogUtils.d(TAG, "handleStopRequest: mState=" + mPlayback.getState() + " error=", null); mPlayback.stop(true); mDelayedStopHandler.removeCallbacksAndMessages(null); mDelayedStopHandler.sendEmptyMessageDelayed(0, STOP_DELAY); updatePlaybackSt...
LyricHere
positive
436,386
@Override public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); super.writeToNBT(nbttagcompound); nbttagcompound.setInteger("currentTime", currentTime); nbttagcompound.setBoolean("isPlaying", isPlaying); nbttagcompound.setFloat("currentRotation", currentRotation); return new S35Pa...
@Override public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); <DeepExtract> super.writeToNBT(nbttagcompound); nbttagcompound.setInteger("currentTime", currentTime); nbttagcompound.setBoolean("isPlaying", isPlaying); nbttagcompound.setFloat("currentRotation", currentRotation); </...
Totemic
positive
436,389
public void setHtml5(boolean html5) { if (builder == null) { builder = new ButtonBuilder(); } if (html5) builder.html5(); }
public void setHtml5(boolean html5) { <DeepExtract> if (builder == null) { builder = new ButtonBuilder(); } </DeepExtract> if (html5) builder.html5(); }
flattr4j
positive
436,391
public void setController(DatePickerController controller) { mController = controller; mController.registerOnDateChangedListener(this); if (mAdapter == null) { mAdapter = createMonthAdapter(getContext(), mController, mThemeDark); } else { mAdapter.setSelectedDay(mSelectedDay); } setAdapter(mAdapter); goTo(mController.g...
public void setController(DatePickerController controller) { mController = controller; mController.registerOnDateChangedListener(this); if (mAdapter == null) { mAdapter = createMonthAdapter(getContext(), mController, mThemeDark); } else { mAdapter.setSelectedDay(mSelectedDay); } setAdapter(mAdapter); <DeepExtract> goTo...
BottomSheetPickers
positive
436,393
public static String getDate(Date date) { String dateString = null; if (date != null) { try { dateString = getDateFormat(DateStyle.YYYY_MM_DD).format(date); } catch (Exception e) { } } return dateString; }
public static String getDate(Date date) { <DeepExtract> String dateString = null; if (date != null) { try { dateString = getDateFormat(DateStyle.YYYY_MM_DD).format(date); } catch (Exception e) { } } return dateString; </DeepExtract> }
SuperNote
positive
436,395
public static Fragment newInstance(String latex, int tag) { ExampleFragment fragment = new ExampleFragment(); mTag = tag; mLatex = latex; return fragment; }
public static Fragment newInstance(String latex, int tag) { ExampleFragment fragment = new ExampleFragment(); mTag = tag; <DeepExtract> mLatex = latex; </DeepExtract> return fragment; }
JLaTexMath-andriod
positive
436,396
@Before public void setUp() { connector = new SmartIdConnectorSpy(); SignatureSessionResponse response = new SignatureSessionResponse(); response.setSessionID("97f5058e-e308-4c83-ac14-7712b0eb9d86"); return response; SessionStatus status = new SessionStatus(); status.setState("COMPLETE"); status.setResult(createSession...
@Before public void setUp() { connector = new SmartIdConnectorSpy(); SignatureSessionResponse response = new SignatureSessionResponse(); response.setSessionID("97f5058e-e308-4c83-ac14-7712b0eb9d86"); return response; <DeepExtract> SessionStatus status = new SessionStatus(); status.setState("COMPLETE"); status.setResult...
smart-id-java-client
positive
436,398
protected IntBuffer getIntBuffer(Collection<Integer> ints, int bufferN) { assert (bufferN < 3); assert (bufferN >= 0); IntBuffer buffer; if (ints.size() < 0) { throw new IllegalArgumentException("minsize must be >=0"); } if (bufferN == 0) { if (ints.size() >= buffer_size0) { buffer_size0 = ints.size() * 2; initBuffer(b...
protected IntBuffer getIntBuffer(Collection<Integer> ints, int bufferN) { assert (bufferN < 3); assert (bufferN >= 0); <DeepExtract> IntBuffer buffer; if (ints.size() < 0) { throw new IllegalArgumentException("minsize must be >=0"); } if (bufferN == 0) { if (ints.size() >= buffer_size0) { buffer_size0 = ints.size() * 2...
monosat
positive
436,399
@Override public <T> ListenableFuture<T> submit(Callable<T> task) { FutureUtils.addExceptionLogging((ListenableFuture<T>) super.submit(task), "Dispatcher task is failed", LOG); return (ListenableFuture<T>) super.submit(task); }
@Override public <T> ListenableFuture<T> submit(Callable<T> task) { <DeepExtract> FutureUtils.addExceptionLogging((ListenableFuture<T>) super.submit(task), "Dispatcher task is failed", LOG); return (ListenableFuture<T>) super.submit(task); </DeepExtract> }
satori-rtm-sdk-java
positive
436,401
private void generateRandomHeight() { int randomInt = random.nextInt(600) + 500; if (randomInt >= 600) { randomInt = 600; } return randomInt; }
private void generateRandomHeight() { <DeepExtract> int randomInt = random.nextInt(600) + 500; if (randomInt >= 600) { randomInt = 600; } return randomInt; </DeepExtract> }
Mediateka
positive
436,402
@Override public void onStateChanged(@NonNull LifecycleOwner source, @NonNull Lifecycle.Event event) { if (shouldDelayFragmentTransactions()) { return; } if (mViewPager.getScrollState() != ViewPager2.SCROLL_STATE_IDLE) { return; } if (mFragments.isEmpty() || getItemCount() == 0) { return; } final int currentItem = mVie...
@Override public void onStateChanged(@NonNull LifecycleOwner source, @NonNull Lifecycle.Event event) { <DeepExtract> if (shouldDelayFragmentTransactions()) { return; } if (mViewPager.getScrollState() != ViewPager2.SCROLL_STATE_IDLE) { return; } if (mFragments.isEmpty() || getItemCount() == 0) { return; } final int curr...
TabLayoutNiubility
positive
436,403
public RetCode adxr(int startIdx, int endIdx, float[] inHigh, float[] inLow, float[] inClose, int optInTimePeriod, MInteger outBegIdx, MInteger outNBElement, double[] outReal) { if (startIdx < 0) return RetCode.OutOfRangeStartIndex; if ((endIdx < 0) || (endIdx < startIdx)) return RetCode.OutOfRangeEndIndex; if ((int) o...
public RetCode adxr(int startIdx, int endIdx, float[] inHigh, float[] inLow, float[] inClose, int optInTimePeriod, MInteger outBegIdx, MInteger outNBElement, double[] outReal) { if (startIdx < 0) return RetCode.OutOfRangeStartIndex; if ((endIdx < 0) || (endIdx < startIdx)) return RetCode.OutOfRangeEndIndex; if ((int) o...
TA-Lib
positive
436,404
public void reload() throws IOException { final URLConnection urlConnection = new URL(myURI + KERNELS_URL + "/" + myKernelId + "/restart").openConnection(); if (urlConnection instanceof HttpURLConnection) { final HttpURLConnection connection = configureConnection((HttpURLConnection) urlConnection, HTTPMethod.POST.name(...
public void reload() throws IOException { <DeepExtract> final URLConnection urlConnection = new URL(myURI + KERNELS_URL + "/" + myKernelId + "/restart").openConnection(); if (urlConnection instanceof HttpURLConnection) { final HttpURLConnection connection = configureConnection((HttpURLConnection) urlConnection, HTTPMet...
intellij-ipnb
positive
436,406
@SneakyThrows(JOSEException.class) public VerifiableCredential sign(VerifiableCredential credential, JWSSigner signer) { Verify.verify(!credential.isSigned().isSigned(), "The VerifiableCredential doesn't have a proof"); !credential.isSigned().validate(); Proof proof = !credential.isSigned().getProof(); JWSObject jwsObj...
@SneakyThrows(JOSEException.class) public VerifiableCredential sign(VerifiableCredential credential, JWSSigner signer) { <DeepExtract> Verify.verify(!credential.isSigned().isSigned(), "The VerifiableCredential doesn't have a proof"); !credential.isSigned().validate(); Proof proof = !credential.isSigned().getProof(); JW...
cord3c-project
positive
436,407
public static void runTask(TaggedRunnable taggedRunnable) { long nanoTime; long j = 0; boolean isDebug = true; if (isDebug) { nanoTime = System.nanoTime(); j = Debug.threadCpuTimeNanos(); } else { nanoTime = 0; } try { taggedRunnable.run(); if (isDebug) { System.out.println("Timing - " + Thread.currentThread().getName(...
public static void runTask(TaggedRunnable taggedRunnable) { <DeepExtract> long nanoTime; long j = 0; boolean isDebug = true; if (isDebug) { nanoTime = System.nanoTime(); j = Debug.threadCpuTimeNanos(); } else { nanoTime = 0; } try { taggedRunnable.run(); if (isDebug) { System.out.println("Timing - " + Thread.currentThr...
ACDD
positive
436,410
private void sourceChanged() { mRetry.setEnabled(false); final float disabledAlpha = .4f; mClickFrame.setEnabled(false); if (mPlayer == null) return; mIsPrepared = false; mPlayer.reset(); mIsPrepared = false; if (mCallback != null) mCallback.onPreparing(this); try { setSourceInternal(); } catch (IOException e) { throwE...
private void sourceChanged() { mRetry.setEnabled(false); final float disabledAlpha = .4f; mClickFrame.setEnabled(false); <DeepExtract> if (mPlayer == null) return; mIsPrepared = false; mPlayer.reset(); mIsPrepared = false; </DeepExtract> if (mCallback != null) mCallback.onPreparing(this); try { setSourceInternal(); } c...
Android-Instagram-Clone
positive
436,411
public void connect(final String wsUrl, final String postUrl) { if (Thread.currentThread() != handler.getLooper().getThread()) { throw new IllegalStateException("WebSocket method is not called on valid thread"); } if (state != WebSocketConnectionState.NEW) { Log.e(TAG, "WebSocket is already connected."); return; } wsSe...
public void connect(final String wsUrl, final String postUrl) { <DeepExtract> if (Thread.currentThread() != handler.getLooper().getThread()) { throw new IllegalStateException("WebSocket method is not called on valid thread"); } </DeepExtract> if (state != WebSocketConnectionState.NEW) { Log.e(TAG, "WebSocket is already...
glass-enterprise-samples
positive
436,413
@Override public InputStream getResourceAsStream(String path) { Resource resource; Resource resource = this.resourceLoader.getResource(getResourceLocation(getResourceLocation(path))); if (!resource.exists()) { resource = null; } try { resource = resource.getURL(); } catch (MalformedURLException ex) { throw ex; } catch ...
@Override public InputStream getResourceAsStream(String path) { <DeepExtract> Resource resource; Resource resource = this.resourceLoader.getResource(getResourceLocation(getResourceLocation(path))); if (!resource.exists()) { resource = null; } try { resource = resource.getURL(); } catch (MalformedURLException ex) { thro...
xcafe
positive
436,414
public static String getYesterday() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, -1); String yesterday; try { java.text.SimpleDateFormat myFormat = new SimpleDateFormat("yyyy-MM-dd"); Date date = myFormat.parse(cal.getTime()); yesterday = date; } catch (Exception e) { yesterday = new Date(cal.getTime...
public static String getYesterday() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, -1); <DeepExtract> String yesterday; try { java.text.SimpleDateFormat myFormat = new SimpleDateFormat("yyyy-MM-dd"); Date date = myFormat.parse(cal.getTime()); yesterday = date; } catch (Exception e) { yesterday = new Da...
JAdmin
positive
436,415
public Criteria andMaxSpeedLessThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "maxSpeed" + " cannot be null"); } criteria.add(new Criterion("maxSpeed <=", value)); return (Criteria) this; }
public Criteria andMaxSpeedLessThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "maxSpeed" + " cannot be null"); } criteria.add(new Criterion("maxSpeed <=", value)); </DeepExtract> return (Criteria) this; }
jtt808-simulator
positive
436,417
@Override public void call(PushPacketToNetwork event) { if (!mc.thePlayer.isEntityAlive()) return; if (!isFlushing) { if (event.getPacket() instanceof C02PacketUseEntity || event.getPacket() instanceof C08PacketPlayerBlockPlacement || event.getPacket() instanceof C07PacketPlayerDigging) { flush(); } else { event.setCan...
@Override public void call(PushPacketToNetwork event) { if (!mc.thePlayer.isEntityAlive()) return; if (!isFlushing) { if (event.getPacket() instanceof C02PacketUseEntity || event.getPacket() instanceof C08PacketPlayerBlockPlacement || event.getPacket() instanceof C07PacketPlayerDigging) { flush(); } else { event.setCan...
SerenityCE
positive
436,418
@Override public SecRoleRecord value2(Role value) { setValue(1, value); return this; }
@Override public SecRoleRecord value2(Role value) { <DeepExtract> setValue(1, value); </DeepExtract> return this; }
BlocklyProp
positive
436,419
@Override public void reset() { resourceFinderStack = new ResourceFinderStack(); for (final String p : packages) { try { final Enumeration<URL> urls = ResourcesProvider.getInstance().getResources(p.replace('.', '/'), classloader); while (urls.hasMoreElements()) { try { addResourceFinder(toURI(urls.nextElement())); } ca...
@Override public void reset() { <DeepExtract> resourceFinderStack = new ResourceFinderStack(); for (final String p : packages) { try { final Enumeration<URL> urls = ResourcesProvider.getInstance().getResources(p.replace('.', '/'), classloader); while (urls.hasMoreElements()) { try { addResourceFinder(toURI(urls.nextEle...
webx-restful
positive
436,420
@Override public void toggleOn(View v) { int i = v.getId(); if (i == R.id.refuse) { doRefuseCall(); } else if (i == R.id.receive) { doReceiveCall(); } else if (i == R.id.avchat_video_logout) { doHangUp(); } else if (i == R.id.avchat_video_mute) { avChatController.toggleMute(); } else if (i == R.id.avchat_switch_camera)...
@Override public void toggleOn(View v) { <DeepExtract> int i = v.getId(); if (i == R.id.refuse) { doRefuseCall(); } else if (i == R.id.receive) { doReceiveCall(); } else if (i == R.id.avchat_video_logout) { doHangUp(); } else if (i == R.id.avchat_video_mute) { avChatController.toggleMute(); } else if (i == R.id.avchat_...
NIM_Android_AVChatKit
positive
436,422
@Override public void onCancel(DialogInterface dialogInterface) { if (getSharedPreferences("Ver", MODE_PRIVATE).getInt("Ver", 0) != 0) { go(); return; } AlertDialog.Builder builder = FreezeYouAlertDialogBuilder(this); builder.setIcon(R.mipmap.ic_launcher_new_round); builder.setTitle(String.format(getString(R.string.wel...
@Override public void onCancel(DialogInterface dialogInterface) { <DeepExtract> if (getSharedPreferences("Ver", MODE_PRIVATE).getInt("Ver", 0) != 0) { go(); return; } AlertDialog.Builder builder = FreezeYouAlertDialogBuilder(this); builder.setIcon(R.mipmap.ic_launcher_new_round); builder.setTitle(String.format(getStrin...
FreezeYou
positive
436,423
@Override public boolean onError(MediaPlayer mp, int what, int extra) { try { mediaPlayer.reset(); mediaPlayer.release(); } catch (Exception e) { Loggi.w("SoundNotificationsManager can not release media player"); } return false; }
@Override public boolean onError(MediaPlayer mp, int what, int extra) { <DeepExtract> try { mediaPlayer.reset(); mediaPlayer.release(); } catch (Exception e) { Loggi.w("SoundNotificationsManager can not release media player"); } </DeepExtract> return false; }
android-wail-app
positive
436,426
@Override public boolean onMenuItemClick(MenuItem item) { Bundle arguments = new Bundle(); arguments.putString(CONTACT_NAME, contactName); arguments.putString(CONTACT_NUMBER, contactNumber); arguments.putString(SMS_MESSAGE_BODY, messageEdit.getText().toString()); CustomFragmentActivity.show(getContext(), getString(R.st...
@Override public boolean onMenuItemClick(MenuItem item) { <DeepExtract> Bundle arguments = new Bundle(); arguments.putString(CONTACT_NAME, contactName); arguments.putString(CONTACT_NUMBER, contactNumber); arguments.putString(SMS_MESSAGE_BODY, messageEdit.getText().toString()); CustomFragmentActivity.show(getContext(), ...
BlackList
positive
436,427
@Override public void onDataPacket(NetworkManager pNetMan, S35PacketUpdateTileEntity pPkt) { if (pPkt.func_148857_g().hasKey(NBTVAL_DIRECTION)) { _mOrientation = ForgeDirection.getOrientation(pPkt.func_148857_g().getByte(NBTVAL_DIRECTION)); } }
@Override public void onDataPacket(NetworkManager pNetMan, S35PacketUpdateTileEntity pPkt) { <DeepExtract> if (pPkt.func_148857_g().hasKey(NBTVAL_DIRECTION)) { _mOrientation = ForgeDirection.getOrientation(pPkt.func_148857_g().getByte(NBTVAL_DIRECTION)); } </DeepExtract> }
NewHorizonsCoreMod
positive
436,428
public void stateChanged(ChangeEvent e) { if (!slider.getValueIsAdjusting()) { if (useWholeNumbers) { int value = ((Number) model.getValue()).intValue(); slider.setValue(value); } else { double value = ((Number) model.getValue()).doubleValue(); int intValue = (int) Math.round(value / stepSize); slider.setValue(intValue...
public void stateChanged(ChangeEvent e) { <DeepExtract> if (!slider.getValueIsAdjusting()) { if (useWholeNumbers) { int value = ((Number) model.getValue()).intValue(); slider.setValue(value); } else { double value = ((Number) model.getValue()).doubleValue(); int intValue = (int) Math.round(value / stepSize); slider.set...
delineate
positive
436,434
public static int getDateCount(String startDate, String endDate) { Date sd; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); try { sd = dateFormat.parse(startDate); } catch (ParseException e) { sd = null; } Date ed; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); try { ed = dateFormat...
public static int getDateCount(String startDate, String endDate) { Date sd; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); try { sd = dateFormat.parse(startDate); } catch (ParseException e) { sd = null; } <DeepExtract> Date ed; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); try { e...
SuitAgent
positive
436,435
@Override public void onButtonStartNavigationClick() { IntentUtility.startNavigationActivity(getContext(), 49.194793, 16.608594); }
@Override public void onButtonStartNavigationClick() { <DeepExtract> IntentUtility.startNavigationActivity(getContext(), 49.194793, 16.608594); </DeepExtract> }
Alfonz
positive
436,437
@Override protected void onDraw(Canvas canvas) { if (mFocusView != null) { canvas.save(); if (null == mLocation) { mLocation = new int[2]; } if (null == mFocusLocation) { mFocusLocation = new int[2]; } getLocationInWindow(mLocation); mFocusView.getLocationInWindow(mFocusLocation); int width = mFocusView.getWidth(); int...
@Override protected void onDraw(Canvas canvas) { <DeepExtract> if (mFocusView != null) { canvas.save(); if (null == mLocation) { mLocation = new int[2]; } if (null == mFocusLocation) { mFocusLocation = new int[2]; } getLocationInWindow(mLocation); mFocusView.getLocationInWindow(mFocusLocation); int width = mFocusView.g...
android_tv_metro
positive
436,438
@Override public boolean contains(Object o) { return getInternalKey(o) != null; }
@Override public boolean contains(Object o) { <DeepExtract> return getInternalKey(o) != null; </DeepExtract> }
SmoothieMap
positive
436,439
public void setThreadCount(int threadCount) { this.THREAD_COUNT = threadCount; try { this.writeConfig(); } catch (IOException e) { Logger.LOGGER.severe(e.toString()); e.printStackTrace(); } }
public void setThreadCount(int threadCount) { this.THREAD_COUNT = threadCount; <DeepExtract> try { this.writeConfig(); } catch (IOException e) { Logger.LOGGER.severe(e.toString()); e.printStackTrace(); } </DeepExtract> }
Minemap
positive
436,440
public static void main(String[] args) { int open = 0, k = 0, minswap = 0, fault = 0, close = 0; char[] sarr = "[]][][".toCharArray(); for (int i = 0; i < "[]][][".length(); i++) { if (sarr[i] == ']') { close++; fault = close - open; } else { open++; if (fault > 0) { minswap += fault; fault--; } } } System.out.println(...
public static void main(String[] args) { <DeepExtract> int open = 0, k = 0, minswap = 0, fault = 0, close = 0; char[] sarr = "[]][][".toCharArray(); for (int i = 0; i < "[]][][".length(); i++) { if (sarr[i] == ']') { close++; fault = close - open; } else { open++; if (fault > 0) { minswap += fault; fault--; } } } Syste...
Java-Solutions
positive
436,441
private boolean parse() throws ParseException { if (schema.length() == 0 && args.length == 0) return true; for (String element : schema.split(",")) { if (element.length() > 0) { String trimmedElement = element.trim(); parseSchemaElement(trimmedElement); } } return true; for (currentArgument = 0; currentArgument < args....
private boolean parse() throws ParseException { if (schema.length() == 0 && args.length == 0) return true; for (String element : schema.split(",")) { if (element.length() > 0) { String trimmedElement = element.trim(); parseSchemaElement(trimmedElement); } } return true; <DeepExtract> for (currentArgument = 0; currentAr...
CleanCode
positive
436,442
public static WeatherApi getWeatherApi() { if (weatherApi != null) return weatherApi; Executor executor = Executors.newCachedThreadPool(); Gson gson = new GsonBuilder().create(); mOkHttpClient = new OkHttpClient(); mOkHttpClient.setConnectTimeout(5, TimeUnit.MINUTES); mOkHttpClient.setWriteTimeout(1, TimeUnit.MINUTES);...
public static WeatherApi getWeatherApi() { if (weatherApi != null) return weatherApi; <DeepExtract> Executor executor = Executors.newCachedThreadPool(); Gson gson = new GsonBuilder().create(); mOkHttpClient = new OkHttpClient(); mOkHttpClient.setConnectTimeout(5, TimeUnit.MINUTES); mOkHttpClient.setWriteTimeout(1, Time...
WeatherMvp
positive
436,443
public synchronized void connected(BluetoothSocket socket, BluetoothDevice device) { if (mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } if (mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } if (mAcceptThread != null) { mAcceptThread.cancel(); mAcceptThread = ...
public synchronized void connected(BluetoothSocket socket, BluetoothDevice device) { if (mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } if (mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } if (mAcceptThread != null) { mAcceptThread.cancel(); mAcceptThread = ...
TaxiLbs
positive
436,445
@Override public void onSuccess(Integer integer) { ivRedPoint.setVisibility(integer > 0 ? View.VISIBLE : View.GONE); }
@Override public void onSuccess(Integer integer) { <DeepExtract> ivRedPoint.setVisibility(integer > 0 ? View.VISIBLE : View.GONE); </DeepExtract> }
shop-front-android
positive
436,447
@Test public void testMultipleProcessesWithPersistenceInMultipleThreads() { SimpleRegisterableItemsFactory factory = new SimpleRegisterableItemsFactory(); factory.addWorkItemHandler("Human Task", TestAsyncWorkItemHandler.class); RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder(...
@Test public void testMultipleProcessesWithPersistenceInMultipleThreads() { SimpleRegisterableItemsFactory factory = new SimpleRegisterableItemsFactory(); factory.addWorkItemHandler("Human Task", TestAsyncWorkItemHandler.class); RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder(...
jBPM6-Developer-Guide
positive
436,450
@Test public void shouldMatchMethodWhenMethodNameAndOwnerClassAndMethodParametersMatch() { CompilationUnitTree compilationUnitTree = parse(CODE_TO_PARSE_METHOD_SELECT_KIND_IDENTIFIER); ClassTree classTree = (ClassTree) compilationUnitTree.types().get(CLASS_INDEX); StatementTree statementTree = ((MethodTree) classTree.m...
@Test public void shouldMatchMethodWhenMethodNameAndOwnerClassAndMethodParametersMatch() { <DeepExtract> CompilationUnitTree compilationUnitTree = parse(CODE_TO_PARSE_METHOD_SELECT_KIND_IDENTIFIER); ClassTree classTree = (ClassTree) compilationUnitTree.types().get(CLASS_INDEX); StatementTree statementTree = ((MethodTre...
AEM-Rules-for-SonarQube
positive
436,451
@Override public void onClick(View v) { if (md5String != null && !md5String.isEmpty()) { ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); ClipData clipData = ClipData.newPlainText("Copied hash", md5String); ((TextView) view.findViewById(R.id.file_md5)).setTextI...
@Override public void onClick(View v) { <DeepExtract> if (md5String != null && !md5String.isEmpty()) { ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); ClipData clipData = ClipData.newPlainText("Copied hash", md5String); ((TextView) view.findViewById(R.id.file_...
rcloneExplorer
positive
436,452
@Override protected void onUIResize(UI ui) { this.shader = this.lx.applet.loadShader("frag.glsl", "vert.glsl"); this.vertexLocation = this.colorLocation = -1; }
@Override protected void onUIResize(UI ui) { <DeepExtract> this.shader = this.lx.applet.loadShader("frag.glsl", "vert.glsl"); this.vertexLocation = this.colorLocation = -1; </DeepExtract> }
P3LX
positive
436,453
public Theme next() { current += 1; if (current == themes.length) { current = 0; } listeners.forEach(l -> l.accept(current())); return themes[current]; }
public Theme next() { current += 1; if (current == themes.length) { current = 0; } listeners.forEach(l -> l.accept(current())); <DeepExtract> return themes[current]; </DeepExtract> }
pacman
positive
436,454
public Criteria andAUsernameIsNotNull() { if ("a_username is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("a_username is not null")); return (Criteria) this; }
public Criteria andAUsernameIsNotNull() { <DeepExtract> if ("a_username is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("a_username is not null")); </DeepExtract> return (Criteria) this; }
webike
positive
436,455
public void onClick(DialogInterface dialog, int which) { if (machineStatus.getState().equals(Constants.MACHINE_STATUS_IDLE)) { Xfrom = machineStatus.getWorkPosition().getCordX(); Yfrom = machineStatus.getWorkPosition().getCordY(); Zfrom = machineStatus.getWorkPosition().getCordZ(); camFromText.setText(String.valueOf(Xf...
public void onClick(DialogInterface dialog, int which) { <DeepExtract> if (machineStatus.getState().equals(Constants.MACHINE_STATUS_IDLE)) { Xfrom = machineStatus.getWorkPosition().getCordX(); Yfrom = machineStatus.getWorkPosition().getCordY(); Zfrom = machineStatus.getWorkPosition().getCordZ(); camFromText.setText(Str...
grblcontroller
positive
436,456
@Override public void onChildMoved(DataSnapshot dataSnapshot, String s) { Exchange exchange = endpoint.createExchange(); exchange.getIn().setBody(new FirebaseMessage.Builder(Operation.CHILD_MOVED, dataSnapshot).setPreviousChildName(s).build()); try { getProcessor().process(exchange); } catch (Exception e) { exchange.se...
@Override public void onChildMoved(DataSnapshot dataSnapshot, String s) { <DeepExtract> Exchange exchange = endpoint.createExchange(); exchange.getIn().setBody(new FirebaseMessage.Builder(Operation.CHILD_MOVED, dataSnapshot).setPreviousChildName(s).build()); try { getProcessor().process(exchange); } catch (Exception e)...
camel-extra
positive
436,457
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public int onTestSize(final int suggestedSize, final RectF availableSPace) { _maxTextSize = suggestedSize; _textCachedSizes.clear(); adjustTextSize(); final String text = getText().toString(); final boolean singleLine = getMaxLines() == 1; if (singleLine) { textRect....
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public int onTestSize(final int suggestedSize, final RectF availableSPace) { <DeepExtract> _maxTextSize = suggestedSize; _textCachedSizes.clear(); adjustTextSize(); </DeepExtract> final String text = getText().toString(); final boolean singleLine = getMaxLines() == 1...
Sefaria-Android
positive
436,458
public static String keyForMethodDeclaration(MethodDeclaration m) { if (m == null) return null; IMethodBinding binding = m.resolveBinding(); if (binding == null) return null; IMethodBinding binding = binding.getMethodDeclaration(); ITypeBinding declaringClass = binding.getDeclaringClass(); if (declaringClass == null) r...
public static String keyForMethodDeclaration(MethodDeclaration m) { if (m == null) return null; IMethodBinding binding = m.resolveBinding(); if (binding == null) return null; <DeepExtract> IMethodBinding binding = binding.getMethodDeclaration(); ITypeBinding declaringClass = binding.getDeclaringClass(); if (declaringCl...
damp.ekeko
positive
436,459
@Override protected void acquireAttributesFromMappingCell(MappingCell mc, Set<Resource> attributes) { acquireResourcesFromInstance(mc.getResource1(), attributes); acquireResourcesFromInstance(mc.getResource2(), attributes); }
@Override protected void acquireAttributesFromMappingCell(MappingCell mc, Set<Resource> attributes) { <DeepExtract> acquireResourcesFromInstance(mc.getResource1(), attributes); acquireResourcesFromInstance(mc.getResource2(), attributes); </DeepExtract> }
FCA-Map
positive
436,460
public TreeNode pruneTree(TreeNode root) { TreeNode dummy = new TreeNode(1); dummy.left = root; if (dummy == null) { return 0; } int leftSum = this.pruneTree0(dummy.left); if (leftSum == 0) { dummy.left = null; } int rightSum = this.pruneTree0(dummy.right); if (rightSum == 0) { dummy.right = null; } return leftSum + ri...
public TreeNode pruneTree(TreeNode root) { TreeNode dummy = new TreeNode(1); dummy.left = root; <DeepExtract> if (dummy == null) { return 0; } int leftSum = this.pruneTree0(dummy.left); if (leftSum == 0) { dummy.left = null; } int rightSum = this.pruneTree0(dummy.right); if (rightSum == 0) { dummy.right = null; } retur...
algorithm1024
positive
436,461
public static void main(String[] pArgs) throws Exception { DigesterExample example = new DigesterExample(); List plays = new ArrayList(); InputStream input = getClass().getResourceAsStream("./plays.xml"); URL rules = getClass().getResource("./play-rules.xml"); Digester digester = DigesterLoader.createDigester(rules); d...
public static void main(String[] pArgs) throws Exception { DigesterExample example = new DigesterExample(); <DeepExtract> List plays = new ArrayList(); InputStream input = getClass().getResourceAsStream("./plays.xml"); URL rules = getClass().getResource("./play-rules.xml"); Digester digester = DigesterLoader.createDige...
common-java-cookbook
positive
436,462
public static void filter(MainActivity activity, StatusViewModel status) { if (status.isRetweet()) { return; } Pattern pattern; for (ExtractionWord word : ExtractionWord.getAll()) { pattern = Pattern.compile(word.text); if (pattern.matcher(status.getText()).find()) { addToMentions(activity, status); } } }
public static void filter(MainActivity activity, StatusViewModel status) { <DeepExtract> if (status.isRetweet()) { return; } Pattern pattern; for (ExtractionWord word : ExtractionWord.getAll()) { pattern = Pattern.compile(word.text); if (pattern.matcher(status.getText()).find()) { addToMentions(activity, status); } } <...
SmileEssence
positive
436,463
public void set(E pSpecial) { bSpecial = true; special = pSpecial; }
public void set(E pSpecial) { <DeepExtract> bSpecial = true; </DeepExtract> special = pSpecial; }
SignShop
positive
436,464
private void assertSchemaProperties(Class<?> expectedSchemaClass, Schema schema) { int expectedFieldsCount = 0; Map<String, Schema> properties = schema.getProperties(); assertNotNull(properties); assertTrue(properties.size() > 0); for (Field expectedSchemaField : expectedSchemaClass.getDeclaredFields()) { if (Modifier....
private void assertSchemaProperties(Class<?> expectedSchemaClass, Schema schema) { int expectedFieldsCount = 0; Map<String, Schema> properties = schema.getProperties(); assertNotNull(properties); assertTrue(properties.size() > 0); for (Field expectedSchemaField : expectedSchemaClass.getDeclaredFields()) { if (Modifier....
vaadin-connect
positive
436,466
@Override public List<OCRResult> createDocumentsWithResults(String[] filenames, String[] outputbases, List<ITesseract.RenderedFormat> formats, int pageIteratorLevel) throws TesseractException { if (filenames.length != outputbases.length) { throw new RuntimeException("The two arrays must match in length."); } handle = T...
@Override public List<OCRResult> createDocumentsWithResults(String[] filenames, String[] outputbases, List<ITesseract.RenderedFormat> formats, int pageIteratorLevel) throws TesseractException { if (filenames.length != outputbases.length) { throw new RuntimeException("The two arrays must match in length."); } handle = T...
tess4j
positive
436,467
public Criteria andFriendidGreaterThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "friendid" + " cannot be null"); } criteria.add(new Criterion("friendid >", value)); return (Criteria) this; }
public Criteria andFriendidGreaterThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "friendid" + " cannot be null"); } criteria.add(new Criterion("friendid >", value)); </DeepExtract> return (Criteria) this; }
chat-software
positive
436,468
@Override public void onNestedScroll(final View target, final int dxConsumed, final int dyConsumed, final int dxUnconsumed, final int dyUnconsumed) { return mNestedScrollingChildHelper.dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, mParentOffsetInWindow); final int dy = dyUnconsumed + mParentO...
@Override public void onNestedScroll(final View target, final int dxConsumed, final int dyConsumed, final int dxUnconsumed, final int dyUnconsumed) { <DeepExtract> return mNestedScrollingChildHelper.dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, mParentOffsetInWindow); </DeepExtract> final int...
CollapsingRefresh
positive
436,469
public static void main(String[] args) { Integer[] array = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }; int n = array.length; IndexMaxHeap<Comparable> indexMapHeap = new IndexMaxHeap<>(array.length); for (int i = 0; i < n; i++) { indexMapHeap.insert(i, array[i]); } for (int i = n - 1; i >= 0; i--) { array[i] = indexMapHeap.extra...
public static void main(String[] args) { Integer[] array = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }; <DeepExtract> int n = array.length; IndexMaxHeap<Comparable> indexMapHeap = new IndexMaxHeap<>(array.length); for (int i = 0; i < n; i++) { indexMapHeap.insert(i, array[i]); } for (int i = n - 1; i >= 0; i--) { array[i] = inde...
ExerciseJava
positive
436,471
@Test public void verify_ifVerificationWasSuccessful_successWillBeShownBeforeNavigatingBack() { presenter.executeVerify = true; verifyCalled = true; if (executeVerify) { super.verify(); } verify(view).showVerificationSuccess(); verify(view).navigateBack(true); }
@Test public void verify_ifVerificationWasSuccessful_successWillBeShownBeforeNavigatingBack() { presenter.executeVerify = true; <DeepExtract> verifyCalled = true; if (executeVerify) { super.verify(); } </DeepExtract> verify(view).showVerificationSuccess(); verify(view).navigateBack(true); }
BWS-Android
positive
436,472
public void closedParen(int line, int pos) { if (!firstToken) tokens += ","; tokens += "CP"; firstToken = false; }
public void closedParen(int line, int pos) { <DeepExtract> if (!firstToken) tokens += ","; tokens += "CP"; firstToken = false; </DeepExtract> }
CC_SMC
positive
436,476
@Override protected void onNewIntent(Intent intent) { setIntent(intent); String action = intent.getAction(); Timber.d(intent.getDataString()); if (Intent.ACTION_SEARCH.equals(action)) { String query = intent.getStringExtra(SearchManager.QUERY); doSearch(query); } else if (ACTION_FOUND.equals(action)) { String id = inte...
@Override protected void onNewIntent(Intent intent) { setIntent(intent); <DeepExtract> String action = intent.getAction(); Timber.d(intent.getDataString()); if (Intent.ACTION_SEARCH.equals(action)) { String query = intent.getStringExtra(SearchManager.QUERY); doSearch(query); } else if (ACTION_FOUND.equals(action)) { St...
frisbee
positive
436,478
public void displayText(String s) { getParent().pushMatrix(); if (textSize > 0.0) getParent().textSize(textSize); if (font != null) getParent().textFont(font); if (textMode.equals(Mode.CONSTANT)) { getParent().fill(textColor); } else if (textMode.equals(Mode.VOLATILE)) { if (isMouseOver()) { int color = getParent().mou...
public void displayText(String s) { getParent().pushMatrix(); if (textSize > 0.0) getParent().textSize(textSize); if (font != null) getParent().textFont(font); if (textMode.equals(Mode.CONSTANT)) { getParent().fill(textColor); } else if (textMode.equals(Mode.VOLATILE)) { if (isMouseOver()) { int color = getParent().mou...
java-algebra-system
positive
436,481
@Override public void recordWrite(DataType<byte[]> dType, byte[] data, int size, Time time, Status status, PerlChannel record) throws IOException { final long ctime = time.getCurrentTime(); status.startTime = ctime; status.records = 1; status.bytes = size; return producer.writeEvent(data); ret.thenAccept(d -> { final l...
@Override public void recordWrite(DataType<byte[]> dType, byte[] data, int size, Time time, Status status, PerlChannel record) throws IOException { final long ctime = time.getCurrentTime(); status.startTime = ctime; status.records = 1; status.bytes = size; <DeepExtract> return producer.writeEvent(data); </DeepExtract> ...
SBK
positive
436,485
private void updateFromEdges(Node node) { Node[] newNodes = Arrays.copyOf(fromNodes, fromNodes.length + 1); newNodes[fromNodes.length] = node; return newNodes; }
private void updateFromEdges(Node node) { <DeepExtract> Node[] newNodes = Arrays.copyOf(fromNodes, fromNodes.length + 1); newNodes[fromNodes.length] = node; return newNodes; </DeepExtract> }
ubu
positive
436,486
public void addDefaultComponents() { semantic = new RDockComponent(); semantic.setComponentName("Semantic Types"); semantic.setSize(100, 200); semantic.setComponent(stPanel); components.add(semantic); if (components.size() > 1) { String layoutDef = "(COLUMN "; for (int i = 0; i < components.size(); i++) layoutDef += "c...
public void addDefaultComponents() { semantic = new RDockComponent(); semantic.setComponentName("Semantic Types"); semantic.setSize(100, 200); semantic.setComponent(stPanel); components.add(semantic); if (components.size() > 1) { String layoutDef = "(COLUMN "; for (int i = 0; i < components.size(); i++) layoutDef += "c...
CSNePS
positive
436,487
@Override public Bitmap getBitmap(int pageIndex) { for (int i = 0; i < SIZE; i++) { if (pageIndex == myPageIndexes[i]) { return myBitmaps[i]; } } int iIndex; for (int i = 0; i < SIZE; i++) { if (myPageIndexes[i] == -2) { iIndex = i; } } for (int i = 0; i < SIZE; i++) { if (myPageIndexes[i] != 0) { iIndex = i; } } throw...
@Override public Bitmap getBitmap(int pageIndex) { for (int i = 0; i < SIZE; i++) { if (pageIndex == myPageIndexes[i]) { return myBitmaps[i]; } } <DeepExtract> int iIndex; for (int i = 0; i < SIZE; i++) { if (myPageIndexes[i] == -2) { iIndex = i; } } for (int i = 0; i < SIZE; i++) { if (myPageIndexes[i] != 0) { iIndex ...
MyEbookReader
positive
436,488
public void testInvalidStep1() { try { ProjectConfig.parse("{" + " 'name': 'foo'," + " 'repositories': {" + " 'x': {'type': 'blah'}" + " }," + " 'translators': [{'from_project_space': 'x'," + " 'to_project_space': 'y'," + " 'steps': [{'name': ''}]}]" + "}"); fail("Expected error"); }...
public void testInvalidStep1() { <DeepExtract> try { ProjectConfig.parse("{" + " 'name': 'foo'," + " 'repositories': {" + " 'x': {'type': 'blah'}" + " }," + " 'translators': [{'from_project_space': 'x'," + " 'to_project_space': 'y'," + " 'steps': [{'name': ''}]}]" + "}"); fail("Expec...
MOE
positive
436,489
@Test public void shouldFindIntersectionBetweenPolylineAndLineSegment() { Polyline a = Polyline.polyline(Point.point(CRS.WGS84, -60, 0), Point.point(CRS.WGS84, -50, 0), Point.point(CRS.WGS84, -30, 0), Point.point(CRS.WGS84, -20, 0), Point.point(CRS.WGS84, -20, 1), Point.point(CRS.WGS84, -50, 1)); LineSegment b = LineSe...
@Test public void shouldFindIntersectionBetweenPolylineAndLineSegment() { Polyline a = Polyline.polyline(Point.point(CRS.WGS84, -60, 0), Point.point(CRS.WGS84, -50, 0), Point.point(CRS.WGS84, -30, 0), Point.point(CRS.WGS84, -20, 0), Point.point(CRS.WGS84, -20, 1), Point.point(CRS.WGS84, -50, 1)); LineSegment b = LineSe...
spatial-algorithms
positive
436,491
@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2022-01-12T15:33:57.736+08:00", comments = "Source Table: m_dictionary") default Optional<MDictionary> selectByPrimaryKey(Long id_) { return MyBatis3Utils.selectOne(this::selectOne, selectList, MDictionary, c -> c.where(id, isEqualTo(id_))); }
@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2022-01-12T15:33:57.736+08:00", comments = "Source Table: m_dictionary") default Optional<MDictionary> selectByPrimaryKey(Long id_) { <DeepExtract> return MyBatis3Utils.selectOne(this::selectOne, selectList, MDictionary, c -> c.where(id, isEqualTo...
harrier
positive
436,493
public Location getHomeLocation(UUID playerUUID) { if (!playerCache.containsKey(playerUUID)) { try { final Players player = new Players(plugin, playerUUID); playerCache.put(playerUUID, player); } catch (Exception e) { } } return playerCache.get(playerUUID).getHomeLocation(1); }
public Location getHomeLocation(UUID playerUUID) { <DeepExtract> if (!playerCache.containsKey(playerUUID)) { try { final Players player = new Players(plugin, playerUUID); playerCache.put(playerUUID, player); } catch (Exception e) { } } </DeepExtract> return playerCache.get(playerUUID).getHomeLocation(1); }
askyblock
positive
436,494
@Override public double getVelocity() { RPS = nativeToRPS(canTalon.getSelectedSensorVelocity(0)); if (RPS == null) { return Double.NaN; } return this.RPS * this.postEncoderGearing * this.unitPerRotation; }
@Override public double getVelocity() { <DeepExtract> RPS = nativeToRPS(canTalon.getSelectedSensorVelocity(0)); if (RPS == null) { return Double.NaN; } return this.RPS * this.postEncoderGearing * this.unitPerRotation; </DeepExtract> }
449-central-repo
positive
436,495
@SuppressWarnings("unchecked") public static <T> T getBean(String name) { Assert.notNull(applicationContext, "applicaitonContext属性未注入!"); return (T) applicationContext.getBean(name); }
@SuppressWarnings("unchecked") public static <T> T getBean(String name) { <DeepExtract> Assert.notNull(applicationContext, "applicaitonContext属性未注入!"); </DeepExtract> return (T) applicationContext.getBean(name); }
chronus
positive
436,497
protected Definition parseDefinitions(String documentBaseURI, Element defEl, Map importedDefs) throws WSDLException { if (!QNameUtils.matches(Constants.Q_ELEM_DEFINITIONS, defEl)) { WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Expected element '" + Constants.Q_ELEM_DEFINITIONS + "'."); wsdlExc...
protected Definition parseDefinitions(String documentBaseURI, Element defEl, Map importedDefs) throws WSDLException { if (!QNameUtils.matches(Constants.Q_ELEM_DEFINITIONS, defEl)) { WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Expected element '" + Constants.Q_ELEM_DEFINITIONS + "'."); wsdlExc...
libre-wsdl4j
positive
436,498
@Override public GenTable selectGenTableById(Long id) { GenTable genTable = genTableMapper.selectGenTableById(id); JSONObject paramsObj = JSONObject.parseObject(genTable.getOptions()); if (!Objects.isNull(paramsObj)) { String treeCode = paramsObj.getString(GenConstants.TREE_CODE); String treeParentCode = paramsObj.getS...
@Override public GenTable selectGenTableById(Long id) { GenTable genTable = genTableMapper.selectGenTableById(id); <DeepExtract> JSONObject paramsObj = JSONObject.parseObject(genTable.getOptions()); if (!Objects.isNull(paramsObj)) { String treeCode = paramsObj.getString(GenConstants.TREE_CODE); String treeParentCode = ...
spring-microservice-exam
positive
436,499
void createPanel(Composite parent) { Composite panel = new Composite(parent, parent.getStyle()); GridData gridDataForPanel = new GridData(SWT.FILL, SWT.FILL, true, true); panel.setLayoutData(gridDataForPanel); this.parent = panel; }
void createPanel(Composite parent) { Composite panel = new Composite(parent, parent.getStyle()); GridData gridDataForPanel = new GridData(SWT.FILL, SWT.FILL, true, true); panel.setLayoutData(gridDataForPanel); <DeepExtract> this.parent = panel; </DeepExtract> }
startexplorer
positive
436,500
public static BigInteger crt(BigInteger[] constraints, BigInteger[] mods, BigInteger M) { BigInteger[] multInv = new BigInteger[constraints.length]; for (int i = 0; i < multInv.length; i++) { BigInteger mi = mods[i]; multInv[i] = euclidean(M.divide(mi), mi)[0]; } BigInteger x = BigInteger.ZERO; for (int i = 0; i < mods...
public static BigInteger crt(BigInteger[] constraints, BigInteger[] mods, BigInteger M) { BigInteger[] multInv = new BigInteger[constraints.length]; for (int i = 0; i < multInv.length; i++) { BigInteger mi = mods[i]; multInv[i] = euclidean(M.divide(mi), mi)[0]; } BigInteger x = BigInteger.ZERO; for (int i = 0; i < mods...
matasano-cryptopals-solutions
positive
436,501
public static void main(String[] args) { Scanner sc = new Scanner(System.in); String title = sc.nextLine(); String author = sc.nextLine(); int price = sc.nextInt(); Book new_novel = new MyBook(title, author, price); System.out.println("Title: " + title); System.out.println("Author: " + author); System.out.println("Pric...
public static void main(String[] args) { Scanner sc = new Scanner(System.in); String title = sc.nextLine(); String author = sc.nextLine(); int price = sc.nextInt(); Book new_novel = new MyBook(title, author, price); <DeepExtract> System.out.println("Title: " + title); System.out.println("Author: " + author); System.out...
hackerrank
positive
436,502
public final TableVerifier withoutPartialMatchTimeout() { this.partialMatchTimeoutMillis = 0; return this; }
public final TableVerifier withoutPartialMatchTimeout() { <DeepExtract> this.partialMatchTimeoutMillis = 0; return this; </DeepExtract> }
tablasco
positive
436,504
public final AssertSubscriber<T> assertError() { int c = completionCount; if (c == 1) { throw new AssertionError("Completed", null); } if (c > 1) { throw new AssertionError("Multiple completions: " + c, null); } return this; int s = errors.size(); if (s == 0) { throw new AssertionError("No error", null); } if (s > 1) {...
public final AssertSubscriber<T> assertError() { <DeepExtract> int c = completionCount; if (c == 1) { throw new AssertionError("Completed", null); } if (c > 1) { throw new AssertionError("Multiple completions: " + c, null); } return this; </DeepExtract> int s = errors.size(); if (s == 0) { throw new AssertionError("No ...
the-turbine
positive
436,505
@Override public void writeByteAndDouble(byte b, double v) throws IOException { if (9 <= buffer.remaining()) { return; } if (callback == null) { throw new BufferOverflowException(); } buffer = callback.call(buffer, 9); buffer.put(b); buffer.putDouble(v); }
@Override public void writeByteAndDouble(byte b, double v) throws IOException { <DeepExtract> if (9 <= buffer.remaining()) { return; } if (callback == null) { throw new BufferOverflowException(); } buffer = callback.call(buffer, 9); </DeepExtract> buffer.put(b); buffer.putDouble(v); }
msgpack-java
positive
436,506
@Override public void setColor(final ARGBType c) { color.set(c); final double scale = 1.0 / (max - min); final int value = color.get(); A = ARGBType.alpha(value); black = 0; map.clear(); map.put(black, value); colorset.add(value); }
@Override public void setColor(final ARGBType c) { color.set(c); <DeepExtract> final double scale = 1.0 / (max - min); final int value = color.get(); A = ARGBType.alpha(value); black = 0; map.clear(); map.put(black, value); colorset.add(value); </DeepExtract> }
bigwarp
positive
436,507
public static byte[] md(byte[] input, String mdType) { try { MessageDigest digest = MessageDigest.getInstance(mdType); return digest.digest(input); } catch (NoSuchAlgorithmException e) { throw new IllegalArgumentException(e); } }
public static byte[] md(byte[] input, String mdType) { <DeepExtract> try { MessageDigest digest = MessageDigest.getInstance(mdType); return digest.digest(input); } catch (NoSuchAlgorithmException e) { throw new IllegalArgumentException(e); } </DeepExtract> }
Zblog
positive
436,509