before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
public Criteria andBz12LessThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "bz12" + " cannot be null"); } criteria.add(new Criterion("`bz12` <=", value)); return (Criteria) this; }
public Criteria andBz12LessThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "bz12" + " cannot be null"); } criteria.add(new Criterion("`bz12` <=", value)); </DeepExtract> return (Criteria) this; }
blockhealth
positive
2,394
public Criteria andOrderidNotEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "orderid" + " cannot be null"); } criteria.add(new Criterion("orderid <>", value)); return (Criteria) this; }
public Criteria andOrderidNotEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "orderid" + " cannot be null"); } criteria.add(new Criterion("orderid <>", value)); </DeepExtract> return (Criteria) this; }
SSM_VUE
positive
2,395
public void run() { boolean doaction; init_stacks(); yynerrs = 0; yyerrflag = 0; yychar = -1; yystate = 0; state_push(yystate); while (true) { doaction = true; if (yydebug) debug("loop"); for (yyn = yydefred[yystate]; yyn == 0; yyn = yydefred[yystate]) { if (yydebug) debug("yyn:" + yyn + " state:" + yystate + " yycha...
public void run() { <DeepExtract> boolean doaction; init_stacks(); yynerrs = 0; yyerrflag = 0; yychar = -1; yystate = 0; state_push(yystate); while (true) { doaction = true; if (yydebug) debug("loop"); for (yyn = yydefred[yystate]; yyn == 0; yyn = yydefred[yystate]) { if (yydebug) debug("yyn:" + yyn + " state:" + yyst...
jaskell
positive
2,397
@Override public Result decode(BinaryBitmap image, Map<DecodeHintType, ?> hints) throws NotFoundException, ChecksumException, FormatException { int width = image.getWidth(); int height = image.getHeight(); int halfWidth = width / 2; int halfHeight = height / 2; try { return delegate.decode(image.crop(0, 0, halfWidth, h...
@Override public Result decode(BinaryBitmap image, Map<DecodeHintType, ?> hints) throws NotFoundException, ChecksumException, FormatException { int width = image.getWidth(); int height = image.getHeight(); int halfWidth = width / 2; int halfHeight = height / 2; try { return delegate.decode(image.crop(0, 0, halfWidth, h...
ScreenCapture
positive
2,398
public void dismountSelf() { this.dataManager.set(VICTIM_UNIQUE_ID, Optional.fromNullable(null)); this.getDataManager().set(ATTACK_DELAY, Integer.valueOf(20)); this.dismountRidingEntity(); }
public void dismountSelf() { this.dataManager.set(VICTIM_UNIQUE_ID, Optional.fromNullable(null)); <DeepExtract> this.getDataManager().set(ATTACK_DELAY, Integer.valueOf(20)); </DeepExtract> this.dismountRidingEntity(); }
PrimitiveMobs
positive
2,399
public void writeFileContent(WPBFile wbFile, OutputStream os) throws WPBException { InputStream is; WPBFilePath cloudFile = new WPBFilePath("public", wbFile.getBlobKey()); try { is = cloudFileStorage.getFileContent(cloudFile); } catch (IOException e) { throw new WPBException("cannot get file content ", e); } try { IOUt...
public void writeFileContent(WPBFile wbFile, OutputStream os) throws WPBException { <DeepExtract> InputStream is; WPBFilePath cloudFile = new WPBFilePath("public", wbFile.getBlobKey()); try { is = cloudFileStorage.getFileContent(cloudFile); } catch (IOException e) { throw new WPBException("cannot get file content ", e)...
cms
positive
2,400
@Override public Publisher<News> createPublisher(long elements) { if (elements <= 0) { return; } Flowable<Success> successFlowable = Flowable.fromPublisher(collection.drop()).ignoreElements().andThen(Flowable.rangeLong(0L, elements).map(l -> NewsHarness.generate()).buffer(500, TimeUnit.MILLISECONDS).flatMap(collection:...
@Override public Publisher<News> createPublisher(long elements) { <DeepExtract> if (elements <= 0) { return; } Flowable<Success> successFlowable = Flowable.fromPublisher(collection.drop()).ignoreElements().andThen(Flowable.rangeLong(0L, elements).map(l -> NewsHarness.generate()).buffer(500, TimeUnit.MILLISECONDS).flatM...
Hands-On-Reactive-Programming-in-Spring-5
positive
2,401
public ResponseStatus removeMovieFromList(SessionToken sessionToken, String listId, Integer movieId) { ApiUrl apiUrl = new ApiUrl(TMDB_METHOD_LIST, listId, "remove_item"); apiUrl.addParam(TmdbAccount.PARAM_SESSION, sessionToken); String jsonBody = Utils.convertToJson(jsonMapper, Collections.singletonMap("media_id", mov...
public ResponseStatus removeMovieFromList(SessionToken sessionToken, String listId, Integer movieId) { <DeepExtract> ApiUrl apiUrl = new ApiUrl(TMDB_METHOD_LIST, listId, "remove_item"); apiUrl.addParam(TmdbAccount.PARAM_SESSION, sessionToken); String jsonBody = Utils.convertToJson(jsonMapper, Collections.singletonMap("...
themoviedbapi
positive
2,402
@Test public void fileReadByteTest() throws IOException { File tmpFile; File tmpFile = null; try { tmpFile = File.createTempFile("RandomAccessObjectTest", "temp"); tmpFile.deleteOnExit(); FileOutputStream out = new FileOutputStream(tmpFile); byte[] buffer = new byte[32768]; int numRead = 0; while ((numRead = new ByteAr...
@Test public void fileReadByteTest() throws IOException { <DeepExtract> File tmpFile; File tmpFile = null; try { tmpFile = File.createTempFile("RandomAccessObjectTest", "temp"); tmpFile.deleteOnExit(); FileOutputStream out = new FileOutputStream(tmpFile); byte[] buffer = new byte[32768]; int numRead = 0; while ((numRea...
archive-patcher
positive
2,403
@Override public void onServicesDiscovered(Gatt gatt, int status) { Log.d("Discovered services, enable notification"); mQueue.clear(); diggServices(); mService.setCharacteristicNotification(mFFF4, true); GattTransaction t = new GattTransaction(mCCC, mCCC.getConstantBytes(GattDescriptor.ENABLE_NOTIFICATION_VALUE)); mQue...
@Override public void onServicesDiscovered(Gatt gatt, int status) { <DeepExtract> Log.d("Discovered services, enable notification"); mQueue.clear(); diggServices(); mService.setCharacteristicNotification(mFFF4, true); GattTransaction t = new GattTransaction(mCCC, mCCC.getConstantBytes(GattDescriptor.ENABLE_NOTIFICATION...
Bluebit
positive
2,404
private void drawTopLeftRoundRect(Canvas canvas, Paint paint, float right, float bottom) { float right = mRadius - mMargin; float bottom = paint - mMargin; switch(mCornerType) { case ALL: new RectF(mMargin, mMargin, mMargin + mDiameter, mMargin + mDiameter).drawRoundRect(new RectF(mMargin, mMargin, right, bottom), mRad...
private void drawTopLeftRoundRect(Canvas canvas, Paint paint, float right, float bottom) { <DeepExtract> float right = mRadius - mMargin; float bottom = paint - mMargin; switch(mCornerType) { case ALL: new RectF(mMargin, mMargin, mMargin + mDiameter, mMargin + mDiameter).drawRoundRect(new RectF(mMargin, mMargin, right,...
SteamGifts
positive
2,405
public String getTemplateComplexValidationChildValidateBegin() { return codeTemplates.getProperty("ComplexValidationChildValidateBegin") == null ? "" : codeTemplates.getProperty("ComplexValidationChildValidateBegin"); }
public String getTemplateComplexValidationChildValidateBegin() { <DeepExtract> return codeTemplates.getProperty("ComplexValidationChildValidateBegin") == null ? "" : codeTemplates.getProperty("ComplexValidationChildValidateBegin"); </DeepExtract> }
OpenCOLLADA
positive
2,406
@Test public void testGetListObject() { List<User> list = testService.getListObject(236); Assert.assertNotNull(list); list = testService.getListObject(236); Assert.assertEquals(list.size(), 3); try { Thread.sleep(5 * 1000); } catch (InterruptedException e) { logger.error(e.getMessage(), e); } list = testService.getList...
@Test public void testGetListObject() { List<User> list = testService.getListObject(236); Assert.assertNotNull(list); list = testService.getListObject(236); Assert.assertEquals(list.size(), 3); <DeepExtract> try { Thread.sleep(5 * 1000); } catch (InterruptedException e) { logger.error(e.getMessage(), e); } </DeepExtrac...
layering-cache
positive
2,408
public long skip(long n) throws IOException { byte[] buffer = buf; if (buffer == null) throw new IOException("Stream closed"); return buffer; if (n <= 0) { return 0; } long avail = count - pos; if (avail <= 0) { if (markpos < 0) return getInIfOpen().skip(n); fill(); avail = count - pos; if (avail <= 0) return 0; } long...
public long skip(long n) throws IOException { <DeepExtract> byte[] buffer = buf; if (buffer == null) throw new IOException("Stream closed"); return buffer; </DeepExtract> if (n <= 0) { return 0; } long avail = count - pos; if (avail <= 0) { if (markpos < 0) return getInIfOpen().skip(n); fill(); avail = count - pos; if ...
btree4j
positive
2,409
@Override public InputStream getInputStream() throws IOException { delegate().connect(); switch(state) { case HANDSHAKE_SENT: input = new TcpInputStream(socket); @SuppressWarnings("resource") LineReader reader = new LineReader(input); String start = reader.readLine(); connection.addHeaderField(null, start); if ((start ...
@Override public InputStream getInputStream() throws IOException { <DeepExtract> delegate().connect(); </DeepExtract> switch(state) { case HANDSHAKE_SENT: input = new TcpInputStream(socket); @SuppressWarnings("resource") LineReader reader = new LineReader(input); String start = reader.readLine(); connection.addHeaderFi...
netx
positive
2,410
protected void onAttachedToWindow() { super.onAttachedToWindow(); mDragController.setWindowToken(getWindowToken()); }
protected void onAttachedToWindow() { <DeepExtract> </DeepExtract> super.onAttachedToWindow(); <DeepExtract> </DeepExtract> mDragController.setWindowToken(getWindowToken()); <DeepExtract> </DeepExtract> }
Open-Launcher-for-GTV
positive
2,411
@Override public void execute(JobExecutionContext context) throws JobExecutionException { ServerJob serverJob = (ServerJob) ClassUtil.BytesToObject(Base64.decodeBase64((String) context.getJobDetail().getJobDataMap().get(CommonConstants.SERVER_JOB_INFO))); serverJob.getJobDetail().getJobDataMap().put(CommonConstants.SER...
@Override public void execute(JobExecutionContext context) throws JobExecutionException { ServerJob serverJob = (ServerJob) ClassUtil.BytesToObject(Base64.decodeBase64((String) context.getJobDetail().getJobDataMap().get(CommonConstants.SERVER_JOB_INFO))); serverJob.getJobDetail().getJobDataMap().put(CommonConstants.SER...
clover
positive
2,412
@Test public void findMinMax1() throws Exception { expected = new MinMax(1, 5); list = Arrays.asList(3, 2, 5, 1, 2, 4); assertEquals(expected, FindMinAndMax.findMinMax(list)); }
@Test public void findMinMax1() throws Exception { expected = new MinMax(1, 5); list = Arrays.asList(3, 2, 5, 1, 2, 4); <DeepExtract> assertEquals(expected, FindMinAndMax.findMinMax(list)); </DeepExtract> }
Elements-of-programming-interviews
positive
2,413
public Criteria andPasswordEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "password" + " cannot be null"); } criteria.add(new Criterion("password =", value)); return (Criteria) this; }
public Criteria andPasswordEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "password" + " cannot be null"); } criteria.add(new Criterion("password =", value)); </DeepExtract> return (Criteria) this; }
garbage-collection
positive
2,414
@Override public Sampler<T> copy() { AverageRandomAccess ra = new AverageRandomAccess(numD); ra.setPosition(this); return ra; }
@Override public Sampler<T> copy() { <DeepExtract> AverageRandomAccess ra = new AverageRandomAccess(numD); ra.setPosition(this); return ra; </DeepExtract> }
BigStitcher
positive
2,415
@Override public void visitRelationshipPattern(final RelationshipPattern relationshipPattern) { if (relationshipPattern.length instanceof ASTNode) { walkASTNode(this, (ASTNode) relationshipPattern.length); } else { walkOtherObject(this, relationshipPattern.length); } if (relationshipPattern.properties instanceof ASTNod...
@Override public void visitRelationshipPattern(final RelationshipPattern relationshipPattern) { if (relationshipPattern.length instanceof ASTNode) { walkASTNode(this, (ASTNode) relationshipPattern.length); } else { walkOtherObject(this, relationshipPattern.length); } if (relationshipPattern.properties instanceof ASTNod...
cytosm
positive
2,416
public LinesChartModel create(final Iterable results, final ChartModelConfiguration configuration) { TestDurationTrendSeriesBuilder builder = new TestDurationTrendSeriesBuilder(); LinesDataSet dataSet = builder.createDataSet(configuration, results); LinesChartModel model = new LinesChartModel(dataSet); LineSeries durat...
public LinesChartModel create(final Iterable results, final ChartModelConfiguration configuration) { TestDurationTrendSeriesBuilder builder = new TestDurationTrendSeriesBuilder(); LinesDataSet dataSet = builder.createDataSet(configuration, results); <DeepExtract> LinesChartModel model = new LinesChartModel(dataSet); Li...
junit-plugin
positive
2,417
private void connect(@NonNull BluetoothPeripheral peripheral, @NonNull BleProtocol protocol) { if (bluetoothState != BT_SCANNING) { Log.e(TAG, "Invalid BT state: " + BT_STATES[bluetoothState]); } central.stopScan(); Log.d(TAG, "Rangefinder bluetooth state: " + BT_STATES[bluetoothState] + " -> " + BT_STATES[BT_CONNECTIN...
private void connect(@NonNull BluetoothPeripheral peripheral, @NonNull BleProtocol protocol) { if (bluetoothState != BT_SCANNING) { Log.e(TAG, "Invalid BT state: " + BT_STATES[bluetoothState]); } central.stopScan(); <DeepExtract> Log.d(TAG, "Rangefinder bluetooth state: " + BT_STATES[bluetoothState] + " -> " + BT_STATE...
BASElineFlightComputer
positive
2,418
public List<List<Integer>> levelOrderBottom2(TreeNode root) { if (root == null) return new LinkedList<>(); if (root == null) return; if (0 == allLevelValues.size()) allLevelValues.add(new LinkedList<>()); allLevelValues.get(0).add(root.val); helper(root.left, 0 + 1); helper(root.right, 0 + 1); Collections.reverse(allLe...
public List<List<Integer>> levelOrderBottom2(TreeNode root) { if (root == null) return new LinkedList<>(); <DeepExtract> if (root == null) return; if (0 == allLevelValues.size()) allLevelValues.add(new LinkedList<>()); allLevelValues.get(0).add(root.val); helper(root.left, 0 + 1); helper(root.right, 0 + 1); </DeepExtra...
AlgoCS
positive
2,419
@Test public void testPad29() throws Exception { String toPad = "g1nger"; byte[] padded = this.getPadded(toPad, 29); assertNotNull("The padded string should not be null.", padded); assertEquals("The padded string has the wrong length.", 29 + 1, padded.length); assertEquals("The last byte is wrong.", 29 - toPad.length()...
@Test public void testPad29() throws Exception { <DeepExtract> String toPad = "g1nger"; byte[] padded = this.getPadded(toPad, 29); assertNotNull("The padded string should not be null.", padded); assertEquals("The padded string has the wrong length.", 29 + 1, padded.length); assertEquals("The last byte is wrong.", 29 - ...
java-license-manager
positive
2,420
@Override public int getArrayIndex() { if (inMap()) { throw new IllegalStateException("Not traversing an array!"); } checkList(); return ((ListIterator<?>) i).previousIndex(); }
@Override public int getArrayIndex() { if (inMap()) { throw new IllegalStateException("Not traversing an array!"); } <DeepExtract> checkList(); return ((ListIterator<?>) i).previousIndex(); </DeepExtract> }
hdocdb
positive
2,422
public boolean isSyntetic() { return synthetic; }
public boolean isSyntetic() { <DeepExtract> return synthetic; </DeepExtract> }
grammatica
positive
2,423
@Override public void init(final FilterConfig filterConfig, final Class<? extends Filter> filterClazz) { this.simpleFilterName = filterClazz.getSimpleName(); final String fileLocationFromFilterConfig = filterConfig.getInitParameter(CONFIGURATION_FILE_LOCATION); boolean filterConfigFileLoad; if (CommonUtils.isEmpty(file...
@Override public void init(final FilterConfig filterConfig, final Class<? extends Filter> filterClazz) { this.simpleFilterName = filterClazz.getSimpleName(); final String fileLocationFromFilterConfig = filterConfig.getInitParameter(CONFIGURATION_FILE_LOCATION); <DeepExtract> boolean filterConfigFileLoad; if (CommonUtil...
java-cas-client
positive
2,424
@Override public void onViewTap(View view, float x, float y) { if (!hasStop) { onBackPressed(); } return false; }
@Override public void onViewTap(View view, float x, float y) { <DeepExtract> if (!hasStop) { onBackPressed(); } return false; </DeepExtract> }
PhotoPick-Master
positive
2,426
@Test public void supportsHttpMethodOverride() throws IOException { response = request.content(Form.urlEncoded().addField("_method", "DELETE")).post("/logout"); assertNoError(); assertThat(response).hasStatusCode(303); }
@Test public void supportsHttpMethodOverride() throws IOException { response = request.content(Form.urlEncoded().addField("_method", "DELETE")).post("/logout"); <DeepExtract> assertNoError(); assertThat(response).hasStatusCode(303); </DeepExtract> }
simple-petstore
positive
2,427
@Test public void eventWithDotInPropertyName() throws Exception { Map<String, Object> event = new HashMap<String, Object>(); event.put("ab.cd", "whatever"); try { client.validateAndBuildEvent(client.getDefaultProject(), "foo", event, null); fail(". in property name"); } catch (KeenException e) { assertEquals("An event ...
@Test public void eventWithDotInPropertyName() throws Exception { Map<String, Object> event = new HashMap<String, Object>(); event.put("ab.cd", "whatever"); <DeepExtract> try { client.validateAndBuildEvent(client.getDefaultProject(), "foo", event, null); fail(". in property name"); } catch (KeenException e) { assertEqu...
KeenClient-Java
positive
2,428
@Deprecated(forRemoval = true) public Map<String, Map<String, Long>> getSlaveWorkspaceUsage() { if (diskUsage.slaveWorkspacesUsage == null) { checkWorkspaces(); } return diskUsage.slaveWorkspacesUsage; }
@Deprecated(forRemoval = true) public Map<String, Map<String, Long>> getSlaveWorkspaceUsage() { <DeepExtract> if (diskUsage.slaveWorkspacesUsage == null) { checkWorkspaces(); } return diskUsage.slaveWorkspacesUsage; </DeepExtract> }
disk-usage-plugin
positive
2,429
public synchronized ObjectName register(Object obj) throws JMException { if (mbeanServer == null) { throw new JMException("JmxServer has not be started"); } ObjectName objectName = ObjectNameUtil.makeObjectName(obj); try { mbean = new ReflectionMbean(obj, getObjectDescription(obj)); } catch (Exception e) { throw create...
public synchronized ObjectName register(Object obj) throws JMException { if (mbeanServer == null) { throw new JMException("JmxServer has not be started"); } ObjectName objectName = ObjectNameUtil.makeObjectName(obj); try { mbean = new ReflectionMbean(obj, getObjectDescription(obj)); } catch (Exception e) { throw create...
simplejmx
positive
2,430
public String getRandomRelationship() { String k; Random ran = new Random(); int x, i, j; JSONArray a; while (getRandom(relationships).indexOf("{{") >= 0) { i = getRandom(relationships).indexOf("{{"); j = getRandom(relationships).indexOf("}}"); k = getRandom(relationships).substring(i + 2, j); a = parseMap.get(k); if (...
public String getRandomRelationship() { <DeepExtract> String k; Random ran = new Random(); int x, i, j; JSONArray a; while (getRandom(relationships).indexOf("{{") >= 0) { i = getRandom(relationships).indexOf("{{"); j = getRandom(relationships).indexOf("}}"); k = getRandom(relationships).substring(i + 2, j); a = parseMa...
RPGCompanion
positive
2,431
public void finished() { double nowSec = nowSec(); prevStartSec = nowSec; setStatus(String.format("Completed %d events in %1.2f secs", totalCount, prevStartSec - startTimeSec)); }
public void finished() { <DeepExtract> double nowSec = nowSec(); prevStartSec = nowSec; setStatus(String.format("Completed %d events in %1.2f secs", totalCount, prevStartSec - startTimeSec)); </DeepExtract> }
gchisto
positive
2,432
@Override public void onCancel(DialogInterface dialogInterface) { cancelled = true; if (thread != null) { thread.interrupt(); } if (finishActivityOnCancel) { getActivity().finish(); } }
@Override public void onCancel(DialogInterface dialogInterface) { <DeepExtract> cancelled = true; if (thread != null) { thread.interrupt(); } if (finishActivityOnCancel) { getActivity().finish(); } </DeepExtract> }
Subsonic-Android
positive
2,433
@ParameterizedTest @MethodSource("versions") void testFailNativePortBusy(Version version) throws Throwable { this.builder.version(version); Cassandra cassandra = this.builder.build(); try { try { cassandra.start(); } catch (Throwable ex) { (cassandra, throwable) -> { assertThat(throwable).doesNotThrowAnyException(); th...
@ParameterizedTest @MethodSource("versions") void testFailNativePortBusy(Version version) throws Throwable { this.builder.version(version); <DeepExtract> Cassandra cassandra = this.builder.build(); try { try { cassandra.start(); } catch (Throwable ex) { (cassandra, throwable) -> { assertThat(throwable).doesNotThrowAnyE...
embedded-cassandra
positive
2,434
private Reader readStreamItemIds(long syncTime, IItemIdListHandler handler) throws IOException, ReaderException, RemoteException { final Context context = mContext == null ? getApplicationContext() : mContext; this.auth = Prefs.getGoogleAuth(context); long authTime = Prefs.getGoogleAuthTime(context); if (this.auth != n...
private Reader readStreamItemIds(long syncTime, IItemIdListHandler handler) throws IOException, ReaderException, RemoteException { final Context context = mContext == null ? getApplicationContext() : mContext; this.auth = Prefs.getGoogleAuth(context); long authTime = Prefs.getGoogleAuthTime(context); if (this.auth != n...
newsplus
positive
2,435
@Test public void diff() throws Exception { RevCommit parent = repo.commit().create(); RevCommit master = repo.branch("refs/heads/master").commit().parent(parent).create(); TestViewFilter.Result result = TestViewFilter.service(repo, "/repo/+diff/master^..master"); FakeHttpServletResponse resp = result.getResponse(); as...
@Test public void diff() throws Exception { RevCommit parent = repo.commit().create(); RevCommit master = repo.branch("refs/heads/master").commit().parent(parent).create(); TestViewFilter.Result result = TestViewFilter.service(repo, "/repo/+diff/master^..master"); FakeHttpServletResponse resp = result.getResponse(); as...
gitiles
positive
2,436
public static void main(String[] args) { DoubleLinkList doubleLinkList = new DoubleLinkList(); Node head = null; if (head == null) { head = new Node(1); head = head; } Node newNode = new Node(1); Node current = head; while (current != null) { current = current.next; } current.next = newNode; newNode.prev = current; ret...
public static void main(String[] args) { DoubleLinkList doubleLinkList = new DoubleLinkList(); Node head = null; if (head == null) { head = new Node(1); head = head; } Node newNode = new Node(1); Node current = head; while (current != null) { current = current.next; } current.next = newNode; newNode.prev = current; ret...
Data-Structures-Algorithms
positive
2,437
public void write(byte data) { buffer[yOffset][xOffset++] = data; if (xOffset >= buffer[yOffset].length) { yOffset++; xOffset = 0; } if (!invalidated.get()) { invalidated.set(true); invalidated(); } }
public void write(byte data) { buffer[yOffset][xOffset++] = data; if (xOffset >= buffer[yOffset].length) { yOffset++; xOffset = 0; } <DeepExtract> if (!invalidated.get()) { invalidated.set(true); invalidated(); } </DeepExtract> }
glcd-emulator
positive
2,438
public static void onCreateInfo(Activity activity, long startTime) { startType = isFirst ? ActivityInfo.COLD_START : ActivityInfo.HOT_START; activity.getWindow().getDecorView().post(new FirstFrameRunnable(activity, startType, startTime)); long curTime = System.currentTimeMillis(); if (activity == null) { if (DEBUG) { L...
public static void onCreateInfo(Activity activity, long startTime) { startType = isFirst ? ActivityInfo.COLD_START : ActivityInfo.HOT_START; activity.getWindow().getDecorView().post(new FirstFrameRunnable(activity, startType, startTime)); long curTime = System.currentTimeMillis(); <DeepExtract> if (activity == null) { ...
ArgusAPM
positive
2,439
private void init() { int k = 0, i = 1, j = 1; do { while (j <= L[i]) { huffsize[k] = i; k++; j++; } i++; j = 1; } while (i <= 16); huffsize[k] = 0; int k = 0, code = 0, si = huffsize[0]; for (; ; ) { do { huffcode[k] = code; code++; k++; } while (huffsize[k] == si); if (huffsize[k] == 0) { break; } do { code = code <<...
private void init() { int k = 0, i = 1, j = 1; do { while (j <= L[i]) { huffsize[k] = i; k++; j++; } i++; j = 1; } while (i <= 16); huffsize[k] = 0; <DeepExtract> int k = 0, code = 0, si = huffsize[0]; for (; ; ) { do { huffcode[k] = code; code++; k++; } while (huffsize[k] == si); if (huffsize[k] == 0) { break; } do { ...
simpleimage
positive
2,440
@Override protected boolean setFrame(int l, int t, int r, int b) { mWidth = r - l; mHeight = b - t; mMatrix.reset(); int r_norm = r - l; mScale = (float) r_norm / (float) mIntrinsicWidth; int paddingHeight = 0; int paddingWidth = 0; if (mScale * mIntrinsicHeight > mHeight) { mScale = (float) mHeight / (float) mIntrinsi...
@Override protected boolean setFrame(int l, int t, int r, int b) { mWidth = r - l; mHeight = b - t; mMatrix.reset(); int r_norm = r - l; mScale = (float) r_norm / (float) mIntrinsicWidth; int paddingHeight = 0; int paddingWidth = 0; if (mScale * mIntrinsicHeight > mHeight) { mScale = (float) mHeight / (float) mIntrinsi...
Mae
positive
2,441
@Override public void onServiceConnected(ComponentName name, IBinder service) { TelinkLog.d("service connected --> " + name.getShortClassName()); serviceConnected = true; dispatchEvent(ServiceEvent.newInstance(this, ServiceEvent.SERVICE_CONNECTED, service)); }
@Override public void onServiceConnected(ComponentName name, IBinder service) { <DeepExtract> TelinkLog.d("service connected --> " + name.getShortClassName()); serviceConnected = true; dispatchEvent(ServiceEvent.newInstance(this, ServiceEvent.SERVICE_CONNECTED, service)); </DeepExtract> }
BleMeshLib
positive
2,442
public int clockSequence() { if (version() != 1) { throw new UnsupportedOperationException("Not a time-based UUID"); } return (int) ((leastSigBits & 0x3FFF000000000000L) >>> 48); }
public int clockSequence() { <DeepExtract> if (version() != 1) { throw new UnsupportedOperationException("Not a time-based UUID"); } </DeepExtract> return (int) ((leastSigBits & 0x3FFF000000000000L) >>> 48); }
DimpleBlog
positive
2,443
@Override public void unwhitelist(String id) throws ConnectionException { this.whitelistedIds.remove(id); JsonValue whitelistedUserList = JsonValue.valueOf(whitelistedIds.stream().collect(Collectors.joining(","))); putOption("alloweduserlist", whitelistedUserList, true); }
@Override public void unwhitelist(String id) throws ConnectionException { this.whitelistedIds.remove(id); <DeepExtract> JsonValue whitelistedUserList = JsonValue.valueOf(whitelistedIds.stream().collect(Collectors.joining(","))); putOption("alloweduserlist", whitelistedUserList, true); </DeepExtract> }
Skype4J
positive
2,444
@Override public void onClick(View v) { if (mLatestLoadedSections == null || mAudioPlayer == null) return; int currentElapsed = mAudioPlayer.elapsed(); for (Section section : mLatestLoadedSections) { final int seek = section.start * 1000; if (seek > currentElapsed) { mAudioPlayer.seekAndPlay(seek); return; } } }
@Override public void onClick(View v) { <DeepExtract> if (mLatestLoadedSections == null || mAudioPlayer == null) return; int currentElapsed = mAudioPlayer.elapsed(); for (Section section : mLatestLoadedSections) { final int seek = section.start * 1000; if (seek > currentElapsed) { mAudioPlayer.seekAndPlay(seek); return...
SGU
positive
2,445
@Override public void decode(HexData input) { if (input.getSize() < MethodId.SIZE_BYTES) { throw new IllegalArgumentException("Empty or short methodId"); } MethodId methodId = MethodId.fromInput(input); if (!methodId.equals(getMethod().getMethodId())) { throw new IllegalArgumentException("Invalid method id: " + methodI...
@Override public void decode(HexData input) { <DeepExtract> if (input.getSize() < MethodId.SIZE_BYTES) { throw new IllegalArgumentException("Empty or short methodId"); } MethodId methodId = MethodId.fromInput(input); if (!methodId.equals(getMethod().getMethodId())) { throw new IllegalArgumentException("Invalid method i...
etherjar
positive
2,446
public static CameraCalibrationCoefficients getLaptop() { try { return new ObjectMapper().readValue((Path.of(getCalibrationPath(true).toString(), "laptop.json").toFile()), CameraCalibrationCoefficients.class); } catch (IOException e) { e.printStackTrace(); return null; } }
public static CameraCalibrationCoefficients getLaptop() { <DeepExtract> try { return new ObjectMapper().readValue((Path.of(getCalibrationPath(true).toString(), "laptop.json").toFile()), CameraCalibrationCoefficients.class); } catch (IOException e) { e.printStackTrace(); return null; } </DeepExtract> }
photonvision
positive
2,447
public AccountEnt createNew(AccountEnt account) { GameContext.getPlayerService().addAccountProfile(account); GameContext.getAysncDbService().saveToDb(account); return account; }
public AccountEnt createNew(AccountEnt account) { <DeepExtract> GameContext.getPlayerService().addAccountProfile(account); GameContext.getAysncDbService().saveToDb(account); return account; </DeepExtract> }
mmorpg
positive
2,448
@Override public LicenseWizardState nextState() { final LicenseWizardState nextState = this.nextState; return null != nextState ? nextState : (this.nextState = super.nextState()); }
@Override public LicenseWizardState nextState() { <DeepExtract> final LicenseWizardState nextState = this.nextState; return null != nextState ? nextState : (this.nextState = super.nextState()); </DeepExtract> }
truelicense
positive
2,449
@Override protected void initView() { mHomeFragment = new HomeFragment(); mRedPacketFragment = new OnSellFragment(); mSelectedFragment = new SelectedFragment(); mSearchFragment = new SearchFragment(); mFm = getSupportFragmentManager(); switchFragment(mHomeFragment); }
@Override protected void initView() { <DeepExtract> mHomeFragment = new HomeFragment(); mRedPacketFragment = new OnSellFragment(); mSelectedFragment = new SelectedFragment(); mSearchFragment = new SearchFragment(); mFm = getSupportFragmentManager(); switchFragment(mHomeFragment); </DeepExtract> }
TaobaoUnion
positive
2,450
public String getExcludes() { final String value = options.get(EXCLUDES); return value == null ? "" : value; }
public String getExcludes() { <DeepExtract> final String value = options.get(EXCLUDES); return value == null ? "" : value; </DeepExtract> }
mangosteen
positive
2,451
@Override public boolean animateChange(ViewHolder oldHolder, ViewHolder newHolder, int fromX, int fromY, int toX, int toY) { if (oldHolder == newHolder) { return animateMove(oldHolder, fromX, fromY, toX, toY); } final float prevTranslationX = ViewCompat.getTranslationX(oldHolder.itemView); final float prevTranslationY ...
@Override public boolean animateChange(ViewHolder oldHolder, ViewHolder newHolder, int fromX, int fromY, int toX, int toY) { if (oldHolder == newHolder) { return animateMove(oldHolder, fromX, fromY, toX, toY); } final float prevTranslationX = ViewCompat.getTranslationX(oldHolder.itemView); final float prevTranslationY ...
MultiView
positive
2,452
public synchronized <T> T toJavaObject(int index, Class<T> type) { if (!isOpenInternal()) { throw new IllegalStateException("Lua state is closed"); } LuaValueProxyRef luaValueProxyRef; while ((luaValueProxyRef = (LuaValueProxyRef) proxyQueue.poll()) != null) { proxySet.remove(luaValueProxyRef); lua_unref(REGISTRYINDEX,...
public synchronized <T> T toJavaObject(int index, Class<T> type) { <DeepExtract> if (!isOpenInternal()) { throw new IllegalStateException("Lua state is closed"); } LuaValueProxyRef luaValueProxyRef; while ((luaValueProxyRef = (LuaValueProxyRef) proxyQueue.poll()) != null) { proxySet.remove(luaValueProxyRef); lua_unref(...
jnlua
positive
2,453
protected void clearPrefixes() { textPanel.clear(); textPanel.clear(); prefixPanel.setVisible(false); }
protected void clearPrefixes() { <DeepExtract> textPanel.clear(); </DeepExtract> textPanel.clear(); prefixPanel.setVisible(false); }
GF
positive
2,454
public ByteBuffer encodeWindowUpdateFrame(int streamId, int deltaWindowSize) { byte flags = 0; int length = 8; ByteBuffer frame = ByteBuffer.allocateDirect(SPDY_HEADER_SIZE + length).order(ByteOrder.BIG_ENDIAN); frame.putShort((short) (version | 0x8000)); frame.putShort((short) SPDY_WINDOW_UPDATE_FRAME); frame.put(flag...
public ByteBuffer encodeWindowUpdateFrame(int streamId, int deltaWindowSize) { byte flags = 0; int length = 8; ByteBuffer frame = ByteBuffer.allocateDirect(SPDY_HEADER_SIZE + length).order(ByteOrder.BIG_ENDIAN); <DeepExtract> frame.putShort((short) (version | 0x8000)); frame.putShort((short) SPDY_WINDOW_UPDATE_FRAME); ...
whiskey
positive
2,455
@Override public void destroyCache(String cacheName) { if (closed) { throw new IllegalStateException("CacheManager " + uri + " is already closed"); } if (cacheName == null) { throw new NullPointerException("cacheName is null"); } synchronized (factoryLock) { int index = 0; for (Cache<?, ?> registeredCache : CacheInstan...
@Override public void destroyCache(String cacheName) { <DeepExtract> if (closed) { throw new IllegalStateException("CacheManager " + uri + " is already closed"); } </DeepExtract> if (cacheName == null) { throw new NullPointerException("cacheName is null"); } synchronized (factoryLock) { int index = 0; for (Cache<?, ?> ...
triava
positive
2,456
public String[][] fetchHeartsArray(NetApp netApp) { String sql = "select * from " + TABLENAME_HEARTS + " where netapp = " + netApp.getValue(); c = mDb.rawQuery(sql, null); int count = c.getCount(); c.moveToFirst(); String[][] tracks = new String[count][3]; for (int i = 0; i < count; i++) { tracks[i][0] = c.getString(c....
public String[][] fetchHeartsArray(NetApp netApp) { String sql = "select * from " + TABLENAME_HEARTS + " where netapp = " + netApp.getValue(); c = mDb.rawQuery(sql, null); int count = c.getCount(); c.moveToFirst(); String[][] tracks = new String[count][3]; for (int i = 0; i < count; i++) { tracks[i][0] = c.getString(c....
sls
positive
2,457
public boolean eglGetConfigAttrib(EGLDisplay display, EGLConfig config, int attribute, int[] value) { log("eglGetConfigAttrib" + '('); mArgCount = 0; if (mArgCount++ > 0) { log(", "); } if (mLogArgumentNames) { log("display" + "="); } log(display); if (mArgCount++ > 0) { log(", "); } if (mLogArgumentNames) { log("confi...
public boolean eglGetConfigAttrib(EGLDisplay display, EGLConfig config, int attribute, int[] value) { log("eglGetConfigAttrib" + '('); mArgCount = 0; if (mArgCount++ > 0) { log(", "); } if (mLogArgumentNames) { log("display" + "="); } log(display); if (mArgCount++ > 0) { log(", "); } if (mLogArgumentNames) { log("confi...
PinFilter
positive
2,458
@Override public void onBindViewHolder(@NonNull PlaceViewHolder holder, int position) { mPlaceInfoView.loadPlace(getItem(position), false); }
@Override public void onBindViewHolder(@NonNull PlaceViewHolder holder, int position) { <DeepExtract> mPlaceInfoView.loadPlace(getItem(position), false); </DeepExtract> }
Around-Me
positive
2,459
public net.plan99.payfile.Payfile.Error getDefaultInstanceForType() { return defaultInstance; }
public net.plan99.payfile.Payfile.Error getDefaultInstanceForType() { <DeepExtract> return defaultInstance; </DeepExtract> }
PayFile
positive
2,460
public void fixOrphanTables() throws IOException { if (shouldFixTableOrphans() && !orphanTableDirs.isEmpty()) { List<TableName> tmpList = new ArrayList<>(orphanTableDirs.keySet().size()); tmpList.addAll(orphanTableDirs.keySet()); TableDescriptor[] htds = getTableDescriptors(tmpList); Iterator<Entry<TableName, Set<Strin...
public void fixOrphanTables() throws IOException { if (shouldFixTableOrphans() && !orphanTableDirs.isEmpty()) { List<TableName> tmpList = new ArrayList<>(orphanTableDirs.keySet().size()); tmpList.addAll(orphanTableDirs.keySet()); TableDescriptor[] htds = getTableDescriptors(tmpList); Iterator<Entry<TableName, Set<Strin...
hbase-operator-tools
positive
2,461
public void writeBytes(byte[] bytes) { int length = bytes.length; if (bytes.length + count - buf.length > 0) grow(bytes.length + count); System.arraycopy(bytes, 0, buf, count, length); count += bytes.length; }
public void writeBytes(byte[] bytes) { int length = bytes.length; <DeepExtract> if (bytes.length + count - buf.length > 0) grow(bytes.length + count); </DeepExtract> System.arraycopy(bytes, 0, buf, count, length); count += bytes.length; }
AutoLoadCache
positive
2,462
public void setCard(UbuntuCard card) { m_card = new WeakReference<UbuntuCard>(card); UbuntuCard card = m_card.get(); if (card == null || m_res == null) return; card.applyResult(m_res); }
public void setCard(UbuntuCard card) { m_card = new WeakReference<UbuntuCard>(card); <DeepExtract> UbuntuCard card = m_card.get(); if (card == null || m_res == null) return; card.applyResult(m_res); </DeepExtract> }
MultiROMMgr
positive
2,463
@Override public void onFileClicked() { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("*/*"); forceStaySocket = true; startActivityForResult(intent, Const.RequestCode.PICK_FILE); if (buttonType == ButtonType.IN_ANIMATION) { return; } buttonType = ButtonType.IN_ANIMATION; menuManager.closeMenu();...
@Override public void onFileClicked() { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("*/*"); forceStaySocket = true; startActivityForResult(intent, Const.RequestCode.PICK_FILE); <DeepExtract> if (buttonType == ButtonType.IN_ANIMATION) { return; } buttonType = ButtonType.IN_ANIMATION; menuManage...
Spika
positive
2,464
@Override public Report call() throws Exception { try { if (in == null) { throw new NullPointerException("InputStream closed already"); } int value = in.readInt(); byte[] sealedArray = new byte[value]; in.readFully(sealedArray); Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); byte[] initVector = Arrays.copyOfR...
@Override public Report call() throws Exception { <DeepExtract> try { if (in == null) { throw new NullPointerException("InputStream closed already"); } int value = in.readInt(); byte[] sealedArray = new byte[value]; in.readFully(sealedArray); Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); byte[] initVector = ...
FoxTrotUpscaler
positive
2,465
public void testHSLBlue() { RgbaColor start = RgbaColor.from("#00f"); float[] HSL = start.convertToHsl(); assertEquals(Math.round(new float[] { 240, 100, 50 }[0]), Math.round(HSL[0])); assertEquals(Math.round(new float[] { 240, 100, 50 }[1]), Math.round(HSL[1])); assertEquals(Math.round(new float[] { 240, 100, 50 }[2])...
public void testHSLBlue() { <DeepExtract> RgbaColor start = RgbaColor.from("#00f"); float[] HSL = start.convertToHsl(); assertEquals(Math.round(new float[] { 240, 100, 50 }[0]), Math.round(HSL[0])); assertEquals(Math.round(new float[] { 240, 100, 50 }[1]), Math.round(HSL[1])); assertEquals(Math.round(new float[] { 240,...
gwt-traction
positive
2,466
public static boolean isConfigured(String database) { if (database == null) { return false; } return dataSources.containsKey(database); }
public static boolean isConfigured(String database) { <DeepExtract> if (database == null) { return false; } return dataSources.containsKey(database); </DeepExtract> }
jorm
positive
2,467
@Test public void simpleRequestDefaultValueParameterNotDocumented() throws Exception { HandlerMethod handlerMethod = createHandlerMethod("updateItem", Integer.class, String.class, int.class, String.class, Optional.class); for (MethodParameter parameter : handlerMethod.getMethodParameters()) { parameter.initParameterNam...
@Test public void simpleRequestDefaultValueParameterNotDocumented() throws Exception { HandlerMethod handlerMethod = createHandlerMethod("updateItem", Integer.class, String.class, int.class, String.class, Optional.class); for (MethodParameter parameter : handlerMethod.getMethodParameters()) { parameter.initParameterNam...
spring-auto-restdocs
positive
2,468
@Override public void onOrientationChanged(int orientation) { Log.d(TAG, "onOrientationChanged:orientation = " + orientation); if (orientation == OrientationEventListener.ORIENTATION_UNKNOWN) return; orientation = (orientation + 45) / 90 * 90; int rotation; if (mCameraInfo.facing == CameraInfo.CAMERA_FACING_FRONT) { ...
@Override public void onOrientationChanged(int orientation) { Log.d(TAG, "onOrientationChanged:orientation = " + orientation); <DeepExtract> if (orientation == OrientationEventListener.ORIENTATION_UNKNOWN) return; orientation = (orientation + 45) / 90 * 90; int rotation; if (mCameraInfo.facing == CameraInfo.CAMERA_FA...
YingKe-MediaCodec
positive
2,469
@Override public void giveExpLevels(int amount) { player.giveExp(amount); }
@Override public void giveExpLevels(int amount) { <DeepExtract> player.giveExp(amount); </DeepExtract> }
Minecordbot
positive
2,470
@Override protected void onWalletStateChanged() { updateChain(R.id.receive_table, mAccount.getReceiveChain()); updateChain(R.id.change_table, mAccount.getChangeChain()); }
@Override protected void onWalletStateChanged() { <DeepExtract> updateChain(R.id.receive_table, mAccount.getReceiveChain()); updateChain(R.id.change_table, mAccount.getChangeChain()); </DeepExtract> }
Wallet32
positive
2,471
@Override public void handleMessage(Message msg) { if (msg.what == TASK_FINISHED) { mViewModificationInProgress = false; if (mNextClusters != null) { sendEmptyMessage(RUN_TASK); } return; } removeMessages(RUN_TASK); if (mViewModificationInProgress) { return; } if (mNextClusters == null) { return; } synchronized (this) ...
@Override public void handleMessage(Message msg) { if (msg.what == TASK_FINISHED) { mViewModificationInProgress = false; if (mNextClusters != null) { sendEmptyMessage(RUN_TASK); } return; } removeMessages(RUN_TASK); if (mViewModificationInProgress) { return; } if (mNextClusters == null) { return; } synchronized (this) ...
eagleDemo
positive
2,472
public synchronized void add(double x, double y) { while (mXY.get(x) != null) { x += getPadding(); } mXY.put(x, y); mMinX = Math.min(mMinX, x); mMaxX = Math.max(mMaxX, x); mMinY = Math.min(mMinY, y); mMaxY = Math.max(mMaxY, y); }
public synchronized void add(double x, double y) { while (mXY.get(x) != null) { x += getPadding(); } mXY.put(x, y); <DeepExtract> mMinX = Math.min(mMinX, x); mMaxX = Math.max(mMaxX, x); mMinY = Math.min(mMinY, y); mMaxY = Math.max(mMaxY, y); </DeepExtract> }
sensorreadout
positive
2,473
@Override public void setAsciiStream(int paramInt, InputStream paramInputStream, long paramLong) throws SQLException { List<Object> paramsList = getParamsList(); paramsList.add(paramInputStream); ((PreparedStatement) this.statement).setAsciiStream(paramInt, paramInputStream, paramLong); }
@Override public void setAsciiStream(int paramInt, InputStream paramInputStream, long paramLong) throws SQLException { <DeepExtract> List<Object> paramsList = getParamsList(); paramsList.add(paramInputStream); </DeepExtract> ((PreparedStatement) this.statement).setAsciiStream(paramInt, paramInputStream, paramLong); }
dts
positive
2,474
public Criteria andIdNotEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "id" + " cannot be null"); } criteria.add(new Criterion("id <>", value)); return (Criteria) this; }
public Criteria andIdNotEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "id" + " cannot be null"); } criteria.add(new Criterion("id <>", value)); </DeepExtract> return (Criteria) this; }
webim
positive
2,475
public synchronized void varright() { State = 1; ListElement la = Pos.node().actions(); Action a; clearsend(); while (la != null) { a = (Action) la.content(); if (a.type().equals("C")) { if (GF.getComment().equals("")) Pos.node().removeaction(la); else a.arguments().content(GF.getComment()); return; } la = la.next(); }...
public synchronized void varright() { <DeepExtract> </DeepExtract> State = 1; <DeepExtract> </DeepExtract> ListElement la = Pos.node().actions(); <DeepExtract> </DeepExtract> Action a; <DeepExtract> </DeepExtract> clearsend(); <DeepExtract> </DeepExtract> while (la != null) { <DeepExtract> </DeepExtract> a = (Action) l...
DragonGoApp
positive
2,476
public void drawTextLeft(final String text, final int x, final int y, final int colour) { if (text == null) { return; } y -= this.fontHeight; for (int c = 0; c < text.length(); c++) { final char character = text.charAt(c); if (character != ' ') { this.drawGlyph(this.glyphPixels[character], x - this.getTextWidth(text) +...
public void drawTextLeft(final String text, final int x, final int y, final int colour) { <DeepExtract> if (text == null) { return; } y -= this.fontHeight; for (int c = 0; c < text.length(); c++) { final char character = text.charAt(c); if (character != ' ') { this.drawGlyph(this.glyphPixels[character], x - this.getTex...
317refactor
positive
2,477
public Builder setHeaderComments(final Object... headerComments) { return toStringArray(headerComments) == null ? null : toStringArray(headerComments).clone(); return this; }
public Builder setHeaderComments(final Object... headerComments) { <DeepExtract> return toStringArray(headerComments) == null ? null : toStringArray(headerComments).clone(); </DeepExtract> return this; }
commons-csv
positive
2,478
@Override public void onEnable() { MultiChatLocal api = MultiChatLocal.getInstance(); LocalConsoleLogger consoleLogger = new LocalSpigotConsoleLogger(getLogger()); api.registerConsoleLogger(consoleLogger); MultiChatLocalPlatform platform = MultiChatLocalPlatform.SPIGOT; api.registerPlatform(platform); String pluginName...
@Override public void onEnable() { MultiChatLocal api = MultiChatLocal.getInstance(); LocalConsoleLogger consoleLogger = new LocalSpigotConsoleLogger(getLogger()); api.registerConsoleLogger(consoleLogger); MultiChatLocalPlatform platform = MultiChatLocalPlatform.SPIGOT; api.registerPlatform(platform); String pluginName...
Development
positive
2,479
public void invokeAsyn(ResultCallback callback) { requestBody = buildRequestBody(); requestBody = wrapRequestBody(requestBody, callback); request = buildRequest(); mOkHttpClientManager.execute(request, callback); }
public void invokeAsyn(ResultCallback callback) { <DeepExtract> requestBody = buildRequestBody(); requestBody = wrapRequestBody(requestBody, callback); request = buildRequest(); </DeepExtract> mOkHttpClientManager.execute(request, callback); }
meiShi
positive
2,480
public static void setChartData(LineChart chart, List<Entry> values) { chart.getDescription().setEnabled(false); chart.setScaleEnabled(false); chart.getLegend().setEnabled(false); chart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM); chart.getAxisRight().setDrawAxisLine(false); YAxis yAxis = chart.getAxisLeft(); yA...
public static void setChartData(LineChart chart, List<Entry> values) { <DeepExtract> chart.getDescription().setEnabled(false); chart.setScaleEnabled(false); chart.getLegend().setEnabled(false); chart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM); chart.getAxisRight().setDrawAxisLine(false); YAxis yAxis = chart.get...
bill
positive
2,482
public void startRandomMotion(String name, int priority) { int max = modelSetting.getMotionNum(name); int no = (int) (Math.random() * max); String motionName = modelSetting.getMotionFile(name, no); if (motionName == null || motionName.equals("")) { if (LAppDefine.DEBUG_LOG) { Log.d(TAG, "Failed to motion."); } return; ...
public void startRandomMotion(String name, int priority) { int max = modelSetting.getMotionNum(name); int no = (int) (Math.random() * max); <DeepExtract> String motionName = modelSetting.getMotionFile(name, no); if (motionName == null || motionName.equals("")) { if (LAppDefine.DEBUG_LOG) { Log.d(TAG, "Failed to motion....
Live2D-Launcher
positive
2,483
public Criteria andIsDeletedLike(String value) { if (value == null) { throw new RuntimeException("Value for " + "isDeleted" + " cannot be null"); } criteria.add(new Criterion("is_deleted like", value)); return (Criteria) this; }
public Criteria andIsDeletedLike(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "isDeleted" + " cannot be null"); } criteria.add(new Criterion("is_deleted like", value)); </DeepExtract> return (Criteria) this; }
MarketServer
positive
2,484
@Override public String apply(Uri<?> uri) { StringBuilder builder = new StringBuilder().append(scheme); if (fragment.length() > 0) { builder.append(":").append(fragment); } if (!params.isEmpty()) { builder.append("?"); List<String> parts = Lists.newArrayList(); for (Map.Entry<String, Collection<String>> entry : params....
@Override public String apply(Uri<?> uri) { <DeepExtract> StringBuilder builder = new StringBuilder().append(scheme); if (fragment.length() > 0) { builder.append(":").append(fragment); } if (!params.isEmpty()) { builder.append("?"); List<String> parts = Lists.newArrayList(); for (Map.Entry<String, Collection<String>> e...
atlas
positive
2,485
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { mLocationPermissionGranted = true; } else { Act...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); <DeepExtract> if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { mLocationPermissionGranted = true...
APPetit
positive
2,487
public ArrayList<ChartSet> prepareEnterAnimation(ChartView chartView) { mEasing.setState(BaseEasingMethod.ENTER); final ArrayList<ChartSet> sets = chartView.getData(); float x; if (mStartXFactor != -1) x = chartView.getInnerChartLeft() + (chartView.getInnerChartRight() - chartView.getInnerChartLeft()) * mStartXFactor; ...
public ArrayList<ChartSet> prepareEnterAnimation(ChartView chartView) { mEasing.setState(BaseEasingMethod.ENTER); <DeepExtract> final ArrayList<ChartSet> sets = chartView.getData(); float x; if (mStartXFactor != -1) x = chartView.getInnerChartLeft() + (chartView.getInnerChartRight() - chartView.getInnerChartLeft()) * m...
NBAPlus
positive
2,488
@Override protected void onDestroy() { super.onDestroy(); if (dialog != null && dialog.isShowing()) { dialog.dismiss(); } unregisterReceiver(finishReceiver); }
@Override protected void onDestroy() { super.onDestroy(); <DeepExtract> if (dialog != null && dialog.isShowing()) { dialog.dismiss(); } </DeepExtract> unregisterReceiver(finishReceiver); }
Upchain-wallet
positive
2,489
public void setEncoding(Encoding encoding) { pragmaTable.put(Pragma.ENCODING.pragmaName, encoding.typeName); }
public void setEncoding(Encoding encoding) { <DeepExtract> pragmaTable.put(Pragma.ENCODING.pragmaName, encoding.typeName); </DeepExtract> }
sqlcipher-jdbc
positive
2,490
@Override public int executeUpdate(String sql) throws SQLException { this.sql = sql; return this.execute(); return 0; }
@Override public int executeUpdate(String sql) throws SQLException { <DeepExtract> this.sql = sql; return this.execute(); </DeepExtract> return 0; }
jdbc-redis
positive
2,491
public void setGraphicsStateParameters(final PDExtendedGraphicsState state) throws IOException { final int byteCount = NumberFormatUtil.formatFloatFast(m_aResources.add(state), m_aFormatDecimal.getMaximumFractionDigits(), m_aFormatBuffer); if (byteCount == -1) { write(m_aFormatDecimal.format(m_aResources.add(state))); ...
public void setGraphicsStateParameters(final PDExtendedGraphicsState state) throws IOException { <DeepExtract> final int byteCount = NumberFormatUtil.formatFloatFast(m_aResources.add(state), m_aFormatDecimal.getMaximumFractionDigits(), m_aFormatBuffer); if (byteCount == -1) { write(m_aFormatDecimal.format(m_aResources....
ph-pdf-layout
positive
2,492
@Override public void beforeTestClass(TestContext testContext) { ApplicationContext appContext = testContext.getApplicationContext(); JdbcOperations jdbcOper = appContext.getBean(JdbcOperations.class); jdbcOper.update("DROP ALL OBJECTS DELETE FILES"); }
@Override public void beforeTestClass(TestContext testContext) { <DeepExtract> ApplicationContext appContext = testContext.getApplicationContext(); JdbcOperations jdbcOper = appContext.getBean(JdbcOperations.class); jdbcOper.update("DROP ALL OBJECTS DELETE FILES"); </DeepExtract> }
secure-token-service
positive
2,493
public Criteria andAddressGreaterThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "address" + " cannot be null"); } criteria.add(new Criterion("address >", value)); return (Criteria) this; }
public Criteria andAddressGreaterThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "address" + " cannot be null"); } criteria.add(new Criterion("address >", value)); </DeepExtract> return (Criteria) this; }
spring-boot-all
positive
2,494
public static Class<?> forName(String className) throws ClassNotFoundException { if (null == className || "".equals(className)) { throw new ClassNotFoundException("class name: " + className); } Class<?> clz = nameToClassCache.get(className); if (clz != null) { return clz; } if (!className.endsWith("[]")) { clz = Class....
public static Class<?> forName(String className) throws ClassNotFoundException { if (null == className || "".equals(className)) { throw new ClassNotFoundException("class name: " + className); } Class<?> clz = nameToClassCache.get(className); if (clz != null) { return clz; } <DeepExtract> if (!className.endsWith("[]")) ...
catty
positive
2,495
public Criteria andDateBetween(Date value1, Date value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "date" + " cannot be null"); } criteria.add(new Criterion("date between", value1, value2)); return (Criteria) this; }
public Criteria andDateBetween(Date value1, Date value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "date" + " cannot be null"); } criteria.add(new Criterion("date between", value1, value2)); </DeepExtract> return (Criteria) this; }
CuitJavaEEPractice
positive
2,496
public Criteria andStockEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "stock" + " cannot be null"); } criteria.add(new Criterion("stock =", value)); return (Criteria) this; }
public Criteria andStockEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "stock" + " cannot be null"); } criteria.add(new Criterion("stock =", value)); </DeepExtract> return (Criteria) this; }
ssmxiaomi
positive
2,497
protected String buildConditionString() { StringBuilder query = new StringBuilder(120); if (!TextUtils.isEmpty(where)) { query.append(" WHERE "); query.append(where); } if (!TextUtils.isEmpty(groupBy)) { query.append(" GROUP BY "); query.append(groupBy); } if (!TextUtils.isEmpty(having)) { query.append(" HAVING "); que...
protected String buildConditionString() { StringBuilder query = new StringBuilder(120); if (!TextUtils.isEmpty(where)) { query.append(" WHERE "); query.append(where); } if (!TextUtils.isEmpty(groupBy)) { query.append(" GROUP BY "); query.append(groupBy); } if (!TextUtils.isEmpty(having)) { query.append(" HAVING "); que...
BlueskyAndroid
positive
2,498
public static Node exists(PLUSObject obj) { if (db == null) initialize(); try (Transaction tx = db.beginTx()) { Node n = db.index().getNodeAutoIndexer().getAutoIndex().get(PROP_PLUSOBJECT_ID, obj.getId()).getSingle(); tx.success(); return n; } }
public static Node exists(PLUSObject obj) { <DeepExtract> if (db == null) initialize(); try (Transaction tx = db.beginTx()) { Node n = db.index().getNodeAutoIndexer().getAutoIndex().get(PROP_PLUSOBJECT_ID, obj.getId()).getSingle(); tx.success(); return n; } </DeepExtract> }
plus
positive
2,500