before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
public void registerResourceManager(DtsResourceManager resourceManager) { ResourceMessageHandler messageProcessor = new ResourceMessageHandler(resourceManager); BlockingQueue<Runnable> clientThreadPoolQueue = Queues.newLinkedBlockingDeque(100); ExecutorService clientMessageExecutor = new ThreadPoolExecutor(nettyClientC...
public void registerResourceManager(DtsResourceManager resourceManager) { ResourceMessageHandler messageProcessor = new ResourceMessageHandler(resourceManager); BlockingQueue<Runnable> clientThreadPoolQueue = Queues.newLinkedBlockingDeque(100); ExecutorService clientMessageExecutor = new ThreadPoolExecutor(nettyClientC...
dts
positive
436,815
public Criteria andRolenameIsNotNull() { if ("rolename is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("rolename is not null")); return (Criteria) this; }
public Criteria andRolenameIsNotNull() { <DeepExtract> if ("rolename is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("rolename is not null")); </DeepExtract> return (Criteria) this; }
wukong-framework
positive
436,816
public void writeUInt64(String name, long value) throws IOException { do { int lsb = Unsigned.toUInt64(value).intValue() & 0x7F; Unsigned.toUInt64(value) = Unsigned.toUInt64(value).shiftRight(7); this.stream.write(lsb | (Unsigned.toUInt64(value).signum() == 0 ? 0 : 0x80)); } while (Unsigned.toUInt64(value).signum() != ...
public void writeUInt64(String name, long value) throws IOException { <DeepExtract> do { int lsb = Unsigned.toUInt64(value).intValue() & 0x7F; Unsigned.toUInt64(value) = Unsigned.toUInt64(value).shiftRight(7); this.stream.write(lsb | (Unsigned.toUInt64(value).signum() == 0 ? 0 : 0x80)); } while (Unsigned.toUInt64(value...
tesla
positive
436,818
private boolean removeOnce(T d) { int idx = elements.indexOf(d); if (idx == -1) return false; while (removeOnce(idx)) ; for (int i = 0; i < layerIndices.length; i++) { if (layerIndices[i] > idx) layerIndices[i]--; } return true; }
private boolean removeOnce(T d) { int idx = elements.indexOf(d); if (idx == -1) return false; <DeepExtract> while (removeOnce(idx)) ; </DeepExtract> for (int i = 0; i < layerIndices.length; i++) { if (layerIndices[i] > idx) layerIndices[i]--; } return true; }
reconos
positive
436,819
@SuppressLint("SetTextI18n") private void initView() { String grade = generalData.getGrade(); String term = generalData.getTerm(); stuId.setText(generalData.getNumber()); stuName.setText(generalData.getName()); int num = 2018; try { num = Integer.parseInt(grade); } catch (Exception e) { UMCrash.generateCustomLog(e, "Se...
@SuppressLint("SetTextI18n") private void initView() { String grade = generalData.getGrade(); String term = generalData.getTerm(); stuId.setText(generalData.getNumber()); stuName.setText(generalData.getName()); int num = 2018; try { num = Integer.parseInt(grade); } catch (Exception e) { UMCrash.generateCustomLog(e, "Se...
GuetClassTable
positive
436,820
public void uncaughtException(Thread t, Throwable e) { if (!shouldStop.get()) for (ISerialListener eachListener : listeners) eachListener.onException(e); }
public void uncaughtException(Thread t, Throwable e) { <DeepExtract> if (!shouldStop.get()) for (ISerialListener eachListener : listeners) eachListener.onException(e); </DeepExtract> }
Firmata
positive
436,822
protected void internalTransform(String phaseName, @SuppressWarnings("rawtypes") Map options) { Iterator<MethodOrMethodContext> rmIterator = Scene.v().getReachableMethods().listener(); while (rmIterator.hasNext()) { SootMethod sm = rmIterator.next().method(); if (!sm.isConcrete()) continue; for (Unit u : sm.retrieveAct...
protected void internalTransform(String phaseName, @SuppressWarnings("rawtypes") Map options) { <DeepExtract> Iterator<MethodOrMethodContext> rmIterator = Scene.v().getReachableMethods().listener(); while (rmIterator.hasNext()) { SootMethod sm = rmIterator.next().method(); if (!sm.isConcrete()) continue; for (Unit u : ...
FlowCog
positive
436,824
public static void clean(String fileName) { SharedPreferences preferences = KulaApp.getInstance().getSharedPreferences(fileName, Context.MODE_PRIVATE); SharedPreferences.Editor editor = preferences.edit(); editor.clear(); editor.apply(); }
public static void clean(String fileName) { SharedPreferences preferences = KulaApp.getInstance().getSharedPreferences(fileName, Context.MODE_PRIVATE); SharedPreferences.Editor editor = preferences.edit(); editor.clear(); <DeepExtract> editor.apply(); </DeepExtract> }
KulaChat
positive
436,825
public void windowClosed(WindowEvent e) { jMenuFile.setText(langMan.readLangFile("FileMenu")); jMenuItemOpen.setText(langMan.readLangFile("OpenMenu")); jMenuItemSaveAs.setText(langMan.readLangFile("SaveAsMenu")); jMenuItemExport.setText(langMan.readLangFile("ExportMenu")); jMenuItemExportToImage.setText(langMan.readLan...
public void windowClosed(WindowEvent e) { <DeepExtract> jMenuFile.setText(langMan.readLangFile("FileMenu")); jMenuItemOpen.setText(langMan.readLangFile("OpenMenu")); jMenuItemSaveAs.setText(langMan.readLangFile("SaveAsMenu")); jMenuItemExport.setText(langMan.readLangFile("ExportMenu")); jMenuItemExportToImage.setText(l...
dragmath
positive
436,826
@Override public void writeJSON(Writer writer) throws IOException { writer.write("{"); writer.write("\"type\":\"LineString\",\"coordinates\":"); writer.write("["); for (Iterator<Point> coordinates = getCoordinates().iterator(); coordinates.hasNext(); ) { coordinates.next().writeCoordinatePart(writer); if (coordinates.h...
@Override public void writeJSON(Writer writer) throws IOException { writer.write("{"); writer.write("\"type\":\"LineString\",\"coordinates\":"); <DeepExtract> writer.write("["); for (Iterator<Point> coordinates = getCoordinates().iterator(); coordinates.hasNext(); ) { coordinates.next().writeCoordinatePart(writer); if ...
osm-common
positive
436,827
public void assertSelectedValues(String selectLocator, String pattern) throws java.lang.Exception { if (selectLocator instanceof String && getSelectedValues(pattern) instanceof String) { assertEquals((String) selectLocator, (String) getSelectedValues(pattern)); } else if (selectLocator instanceof String && getSelectedV...
public void assertSelectedValues(String selectLocator, String pattern) throws java.lang.Exception { <DeepExtract> if (selectLocator instanceof String && getSelectedValues(pattern) instanceof String) { assertEquals((String) selectLocator, (String) getSelectedValues(pattern)); } else if (selectLocator instanceof String &...
selenium-client-factory
positive
436,828
@Override public ThreadPage parseHtmlResponse(Request<ThreadPage> request, NetworkResponse response, Document document) throws Exception { ArrayList<HashMap<String, String>> posts = new ArrayList<HashMap<String, String>>(); int currentPage, maxPage = 1, threadId, forumId, unread; String jumpToId = jumpToPost > 0 ? "#po...
@Override public ThreadPage parseHtmlResponse(Request<ThreadPage> request, NetworkResponse response, Document document) throws Exception { <DeepExtract> ArrayList<HashMap<String, String>> posts = new ArrayList<HashMap<String, String>>(); int currentPage, maxPage = 1, threadId, forumId, unread; String jumpToId = jumpToP...
something.apk
positive
436,830
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (!mShouldCallbackDuringFling) { removeCallbacks(mDisableSuppressSelectionChangedRunnable); if (!mSuppressSelectionChanged) mSuppressSelectionChanged = true; } if ((int) -velocityX == 0) return; startCommon(); int initialX = (i...
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (!mShouldCallbackDuringFling) { removeCallbacks(mDisableSuppressSelectionChangedRunnable); if (!mSuppressSelectionChanged) mSuppressSelectionChanged = true; } <DeepExtract> if ((int) -velocityX == 0) return; startCommon(); int...
Open-Launcher-for-GTV
positive
436,831
@Override public JiraCsvRecord values(Long value1, String value2) { setBoardId(value1); return this; setCsv(value2); return this; return this; }
@Override public JiraCsvRecord values(Long value1, String value2) { setBoardId(value1); return this; <DeepExtract> setCsv(value2); return this; </DeepExtract> return this; }
sapling
positive
436,833
public Criteria andCancelRedirectUriNotLike(String value) { if (value == null) { throw new RuntimeException("Value for " + "cancelRedirectUri" + " cannot be null"); } criteria.add(new Criterion("cancel_redirect_uri not like", value)); return (Criteria) this; }
public Criteria andCancelRedirectUriNotLike(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "cancelRedirectUri" + " cannot be null"); } criteria.add(new Criterion("cancel_redirect_uri not like", value)); </DeepExtract> return (Criteria) this; }
oauth4j
positive
436,834
@Override public void rename(String applicationName, String newName) { handleExceptions(() -> { () -> delegate.rename(applicationName, newName).run(); return null; }); }
@Override public void rename(String applicationName, String newName) { <DeepExtract> handleExceptions(() -> { () -> delegate.rename(applicationName, newName).run(); return null; }); </DeepExtract> }
cf-java-client-sap
positive
436,835
void shutdown() { ScheduledFuture<?> future = inactivityFuture; if (future != null) { future.cancel(true); inactivityFuture = null; } inactivityTimer.shutdown(); }
void shutdown() { <DeepExtract> ScheduledFuture<?> future = inactivityFuture; if (future != null) { future.cancel(true); inactivityFuture = null; } </DeepExtract> inactivityTimer.shutdown(); }
AegisWallet
positive
436,836
public Collection<Project> disconnectProject(@NonNull final Long ligandId, @NonNull final Long projectId) { final Ligand ligand = Optional.ofNullable(repository.findOne(ligandId)).orElseThrow(() -> new ResourceNotFoundException("Ligand not found")); final Project project = ligand.getProjects().stream().filter(p -> p.ge...
public Collection<Project> disconnectProject(@NonNull final Long ligandId, @NonNull final Long projectId) { final Ligand ligand = Optional.ofNullable(repository.findOne(ligandId)).orElseThrow(() -> new ResourceNotFoundException("Ligand not found")); final Project project = ligand.getProjects().stream().filter(p -> p.ge...
gP2S
positive
436,839
public void smile(float angle) { mFirstStep = angle / 360.0f <= 1; if (mFirstStep) { mShowLeftEye = angle % 360 > 225.0f; mShowRightEye = angle % 360 > 315.0f; mSweepAngle = 0.1f; mStartAngle = angle; } else { mShowLeftEye = (angle / 360.0f <= 2) && angle % 360 <= 225.0f; mShowRightEye = (angle / 360.0f <= 2) && angle ...
public void smile(float angle) { <DeepExtract> mFirstStep = angle / 360.0f <= 1; if (mFirstStep) { mShowLeftEye = angle % 360 > 225.0f; mShowRightEye = angle % 360 > 315.0f; mSweepAngle = 0.1f; mStartAngle = angle; } else { mShowLeftEye = (angle / 360.0f <= 2) && angle % 360 <= 225.0f; mShowRightEye = (angle / 360.0f <...
XRefreshView
positive
436,840
@Test public void integer() throws Exception { runEncoder("integer", new TomlWriter()); }
@Test public void integer() throws Exception { <DeepExtract> runEncoder("integer", new TomlWriter()); </DeepExtract> }
toml4j
positive
436,841
public static void index(String name, IndexType type, Object... columns) { if (currentTable == null) { throw new IciqlException("This method may only be called " + "from within the define() method, and the define() method " + "is called by the framework."); } currentTableDefinition.defineIndex(name, type, columns); }
public static void index(String name, IndexType type, Object... columns) { <DeepExtract> if (currentTable == null) { throw new IciqlException("This method may only be called " + "from within the define() method, and the define() method " + "is called by the framework."); } </DeepExtract> currentTableDefinition.defineIn...
iciql
positive
436,842
public static system.proxies.UserReportInfo load(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException { com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveId(contex...
public static system.proxies.UserReportInfo load(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException { com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveId(contex...
QueryApiBlogPost
positive
436,843
public Criteria andSyncScriptNotLike(String value) { if (value == null) { throw new RuntimeException("Value for " + "syncScript" + " cannot be null"); } criteria.add(new Criterion("sync_script not like", value)); return (Criteria) this; }
public Criteria andSyncScriptNotLike(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "syncScript" + " cannot be null"); } criteria.add(new Criterion("sync_script not like", value)); </DeepExtract> return (Criteria) this; }
AnyMock
positive
436,844
private void dock() { setLocation(dockedLocation); docked = true; if (isVisible()) repaint(); }
private void dock() { <DeepExtract> setLocation(dockedLocation); </DeepExtract> docked = true; if (isVisible()) repaint(); }
javatari
positive
436,846
@Test public void testUpdateOnDetachedEntity() { LOGGER.info("Test update for detached entity"); Post post = doInTransaction(session -> (Post) session.createQuery("select p " + "from Post p " + "join fetch p.details " + "join fetch p.comments " + "where " + " p.id = :id").setParameter("id", 1L).uniqueResult()); this....
@Test public void testUpdateOnDetachedEntity() { LOGGER.info("Test update for detached entity"); Post post = doInTransaction(session -> (Post) session.createQuery("select p " + "from Post p " + "join fetch p.details " + "join fetch p.comments " + "where " + " p.id = :id").setParameter("id", 1L).uniqueResult()); <Deep...
hibernate-master-class
positive
436,847
@Override public default boolean action(Action action, Creature performer, Item[] targets, short num, float counter) { return propagate(action, SERVER_PROPAGATION, ACTION_PERFORMER_PROPAGATION); }
@Override public default boolean action(Action action, Creature performer, Item[] targets, short num, float counter) { <DeepExtract> return propagate(action, SERVER_PROPAGATION, ACTION_PERFORMER_PROPAGATION); </DeepExtract> }
WurmServerModLauncher
positive
436,850
private static String responseBody(HttpResponse response) { try { InputStream content = response.getEntity().getContent(); Charset encoding = response.getEntity().getContentEncoding() == null ? defaultCharset() : Charset.forName(response.getEntity().getContentEncoding().getValue()); String contentString = inputStreamAs...
private static String responseBody(HttpResponse response) { <DeepExtract> try { InputStream content = response.getEntity().getContent(); Charset encoding = response.getEntity().getContentEncoding() == null ? defaultCharset() : Charset.forName(response.getEntity().getContentEncoding().getValue()); String contentString =...
confluence-publisher
positive
436,851
private static void drawEditBox(long vg, String text, float x, float y, float w, float h) { NVGPaint bg = paintA; nvgBoxGradient(vg, x + 1, y + 1 + 1.5f, w - 2, h - 2, 3, 4, rgba(255, 255, 255, 32, colorA), rgba(32, 32, 32, 32, colorB), bg); nvgBeginPath(vg); nvgRoundedRect(vg, x + 1, y + 1, w - 2, h - 2, 4 - 1); nvgFi...
private static void drawEditBox(long vg, String text, float x, float y, float w, float h) { <DeepExtract> NVGPaint bg = paintA; nvgBoxGradient(vg, x + 1, y + 1 + 1.5f, w - 2, h - 2, 3, 4, rgba(255, 255, 255, 32, colorA), rgba(32, 32, 32, 32, colorB), bg); nvgBeginPath(vg); nvgRoundedRect(vg, x + 1, y + 1, w - 2, h - 2,...
Clear
positive
436,852
public void actionPerformed(java.awt.event.ActionEvent evt) { satuan = new Satuan(); satuan.setId(jTextFieldKode.getText()); satuan.setNama(jTextFieldNama.getText()); satuan.setInfo(jTextAreaInfo.getText()); satuan.setTerakhirDirubah(new Date()); satuan.setWaktuDibuat(new Date()); SatuanValidator validator = SpringMana...
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> satuan = new Satuan(); satuan.setId(jTextFieldKode.getText()); satuan.setNama(jTextFieldNama.getText()); satuan.setInfo(jTextAreaInfo.getText()); satuan.setTerakhirDirubah(new Date()); satuan.setWaktuDibuat(new Date()); SatuanValidator validato...
simple-pos
positive
436,853
final void invertGeneral(Matrix4f m1) { double[] temp = new double[16]; double[] result = new double[16]; int[] row_perm = new int[4]; temp[0] = m1.m00; temp[1] = m1.m01; temp[2] = m1.m02; temp[3] = m1.m03; temp[4] = m1.m10; temp[5] = m1.m11; temp[6] = m1.m12; temp[7] = m1.m13; temp[8] = m1.m20; temp[9] = m1.m21; temp[...
final void invertGeneral(Matrix4f m1) { double[] temp = new double[16]; double[] result = new double[16]; int[] row_perm = new int[4]; temp[0] = m1.m00; temp[1] = m1.m01; temp[2] = m1.m02; temp[3] = m1.m03; temp[4] = m1.m10; temp[5] = m1.m11; temp[6] = m1.m12; temp[7] = m1.m13; temp[8] = m1.m20; temp[9] = m1.m21; temp[...
vecmath
positive
436,857
private void putAll(Map<? extends K, ? extends V> entries, boolean callWriter) { if (isClosed()) throw new IllegalStateException("Cache already closed: " + tcache.id()); if (entries.isEmpty()) return; for (java.util.Map.Entry<? extends K, ? extends V> entry : entries.entrySet()) { K key = entry.getKey(); V value = entr...
private void putAll(Map<? extends K, ? extends V> entries, boolean callWriter) { if (isClosed()) throw new IllegalStateException("Cache already closed: " + tcache.id()); if (entries.isEmpty()) return; <DeepExtract> for (java.util.Map.Entry<? extends K, ? extends V> entry : entries.entrySet()) { K key = entry.getKey(); ...
triava
positive
436,860
@Test public void testGetPageOfColumnsFromRowReverseWithOffset() throws Exception { char[] expectedColumns = new char[] { 'u', 't', 's', 'r', 'q' }; List<Column> columns = createSelector().getPageOfColumnsFromRow(CF, fromLong(25l), fromChar('v'), true, expectedColumns.length, ConsistencyLevel.ONE); assertEquals("Wrong ...
@Test public void testGetPageOfColumnsFromRowReverseWithOffset() throws Exception { char[] expectedColumns = new char[] { 'u', 't', 's', 'r', 'q' }; List<Column> columns = createSelector().getPageOfColumnsFromRow(CF, fromLong(25l), fromChar('v'), true, expectedColumns.length, ConsistencyLevel.ONE); <DeepExtract> assert...
scale7-pelops
positive
436,861
public void onClick(View v) { if (MyDebug.LOG) Log.d(TAG, "zoomOut()"); if (zoom_factor > 0) { zoomTo(zoom_factor - 1, true); } }
public void onClick(View v) { <DeepExtract> if (MyDebug.LOG) Log.d(TAG, "zoomOut()"); if (zoom_factor > 0) { zoomTo(zoom_factor - 1, true); } </DeepExtract> }
dualcamera
positive
436,862
public void write(char[] cbuf, int off, int len) throws IOException { buffer.write(cbuf, off, len); resinConvert(buffer.toString(), target); buffer.reset(); }
public void write(char[] cbuf, int off, int len) throws IOException { buffer.write(cbuf, off, len); <DeepExtract> resinConvert(buffer.toString(), target); buffer.reset(); </DeepExtract> }
sitemesh2
positive
436,863
private void viewWotPlotsByRpm(boolean skipDrops) { List<String> dataColNames = wotPlotsColumn.getSelectedItems(); if (dataColNames == null || dataColNames.size() == 0) return; TreeSet<String> colNames = new TreeSet<String>(); for (int i = 0; i < dataColNames.size(); ++i) colNames.add(dataColNames.get(i)); for (Iterato...
private void viewWotPlotsByRpm(boolean skipDrops) { List<String> dataColNames = wotPlotsColumn.getSelectedItems(); if (dataColNames == null || dataColNames.size() == 0) return; TreeSet<String> colNames = new TreeSet<String>(); for (int i = 0; i < dataColNames.size(); ++i) colNames.add(dataColNames.get(i)); for (Iterato...
mafscaling
positive
436,866
public static void main(String[] args) { Person person = new Person("mkyong", 40, new BigDecimal(900)); byte[] bytes; ByteArrayOutputStream boas = new ByteArrayOutputStream(); try (ObjectOutputStream ois = new ObjectOutputStream(boas)) { ois.writeObject(person); bytes = boas.toByteArray(); } catch (IOException ioe) { i...
public static void main(String[] args) { Person person = new Person("mkyong", 40, new BigDecimal(900)); <DeepExtract> byte[] bytes; ByteArrayOutputStream boas = new ByteArrayOutputStream(); try (ObjectOutputStream ois = new ObjectOutputStream(boas)) { ois.writeObject(person); bytes = boas.toByteArray(); } catch (IOExce...
core-java
positive
436,867
public Entry createRawEntry(User user, Entry source, String type, String id, String quotation, String note, Long modTime, Long createTime, boolean isPublic, boolean isAdmin, Errors errors) { if (null != null) { if (null == null) { Errors.add(errors, errorMessages.errorRelatedIdIsNull()); return null; } if (null.isEmpty...
public Entry createRawEntry(User user, Entry source, String type, String id, String quotation, String note, Long modTime, Long createTime, boolean isPublic, boolean isAdmin, Errors errors) { <DeepExtract> if (null != null) { if (null == null) { Errors.add(errors, errorMessages.errorRelatedIdIsNull()); return null; } if...
crushpaper
positive
436,868
public void postTweet(int userId, int tweetId) { if (map.containsKey(userId)) return true; Set<Integer> set = new HashSet<Integer>(); set.add(userId); map.put(userId, set); return false; list.add(new Msg(userId, tweetId)); }
public void postTweet(int userId, int tweetId) { <DeepExtract> if (map.containsKey(userId)) return true; Set<Integer> set = new HashSet<Integer>(); set.add(userId); map.put(userId, set); return false; </DeepExtract> list.add(new Msg(userId, tweetId)); }
OnlineJudge-Solutions
positive
436,870
@Override public List<CloudServiceOffering> getServiceOfferings() { handleExceptions(() -> { () -> delegate.getServiceOfferings().run(); return null; }); }
@Override public List<CloudServiceOffering> getServiceOfferings() { <DeepExtract> handleExceptions(() -> { () -> delegate.getServiceOfferings().run(); return null; }); </DeepExtract> }
cf-java-client-sap
positive
436,871
@Override public void write(int b) throws IOException { out.write(RLPEncoder.string(b), 0, RLPEncoder.string(b).length); }
@Override public void write(int b) throws IOException { <DeepExtract> out.write(RLPEncoder.string(b), 0, RLPEncoder.string(b).length); </DeepExtract> }
headlong
positive
436,873
private void instrumentActivity(SootClass sc) { try { isTrueActivity(sc); } catch (Exception e) { e.printStackTrace(); return; } new FieldInstrumenter(sc).instrument(); new MethodInstrumenter(sc).instrument(); }
private void instrumentActivity(SootClass sc) { try { isTrueActivity(sc); } catch (Exception e) { e.printStackTrace(); return; } new FieldInstrumenter(sc).instrument(); <DeepExtract> new MethodInstrumenter(sc).instrument(); </DeepExtract> }
EHBDroid
positive
436,877
@Test public void canGeneratePull() { List<Object> originalList = Lists.newArrayList(); List<Object> dirtyList = Lists.newArrayList(); originalList.add("original"); origin.append("list", originalList); dirty.append("list", dirtyList); final Document diff = new DbObjectDiff(origin).compareWith(dirty); final Document pul...
@Test public void canGeneratePull() { List<Object> originalList = Lists.newArrayList(); List<Object> dirtyList = Lists.newArrayList(); originalList.add("original"); <DeepExtract> origin.append("list", originalList); dirty.append("list", dirtyList); </DeepExtract> final Document diff = new DbObjectDiff(origin).compareWi...
mongolink
positive
436,878
public void start(I iface, up_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { checkReady(); up_call method_call = new up_call(args.cnode, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void start(I iface, up_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { <DeepExtract> checkReady(); up_call method_call = new up_call(args.cnode, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call...
tns
positive
436,880
@Override protected void onFailure(final APIErrorResult apiErrorResult) { final Intent intent = new Intent(this, KakaoStoryLoginActivity.class); startActivity(intent); finish(); }
@Override protected void onFailure(final APIErrorResult apiErrorResult) { <DeepExtract> final Intent intent = new Intent(this, KakaoStoryLoginActivity.class); startActivity(intent); finish(); </DeepExtract> }
kakao-android-sdk-standalone
positive
436,881
private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) { document.getEditor().copy(); if ((document != null) && !document.running) { jButton16.setEnabled(true); jButton17.setEnabled(document.hasSnapshot()); jMenu2.setEnabled(true); jButton6.setEnabled(false); jButton14.setEnabled(false); jButton15.setEna...
private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) { document.getEditor().copy(); <DeepExtract> if ((document != null) && !document.running) { jButton16.setEnabled(true); jButton17.setEnabled(document.hasSnapshot()); jMenu2.setEnabled(true); jButton6.setEnabled(false); jButton14.setEnabled(false); jB...
Jasmin
positive
436,882
public void index(DataStore imageStore, Games game, String gameType, String releaseFile) { gameTypes.stream().filter(g -> !g.gametype.deleted()).filter(g -> g.gametype.game().equals(game.name) && g.gametype.name().equalsIgnoreCase(gameType)).findFirst().ifPresentOrElse(g -> { GameType clone; try { clone = YAML.fromStri...
public void index(DataStore imageStore, Games game, String gameType, String releaseFile) { <DeepExtract> gameTypes.stream().filter(g -> !g.gametype.deleted()).filter(g -> g.gametype.game().equals(game.name) && g.gametype.name().equalsIgnoreCase(gameType)).findFirst().ifPresentOrElse(g -> { GameType clone; try { clone =...
unreal-archive
positive
436,884
private void smooth() { dilation(isSpeech, maskRadius); erosion(isSpeech, maskRadius); erosion(isSpeech, maskRadius); dilation(isSpeech, maskRadius); }
private void smooth() { dilation(isSpeech, maskRadius); erosion(isSpeech, maskRadius); <DeepExtract> erosion(isSpeech, maskRadius); dilation(isSpeech, maskRadius); </DeepExtract> }
crowdpp
positive
436,885
public Criteria andTotalNotEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "total" + " cannot be null"); } criteria.add(new Criterion("total <>", value)); return (Criteria) this; }
public Criteria andTotalNotEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "total" + " cannot be null"); } criteria.add(new Criterion("total <>", value)); </DeepExtract> return (Criteria) this; }
Ordering
positive
436,889
private void init() { LOGGER.info("Initializing instance meta-data..."); this.instanceId = ec2MetadataClient.getInstanceId(); if (this.instanceId == null) { throw new BootstrapException("Unable to get instance-id from AwsUtils. Either the application is not running in AWS, or AWS is having issues."); } this.privateIp =...
private void init() { LOGGER.info("Initializing instance meta-data..."); this.instanceId = ec2MetadataClient.getInstanceId(); if (this.instanceId == null) { throw new BootstrapException("Unable to get instance-id from AwsUtils. Either the application is not running in AWS, or AWS is having issues."); } this.privateIp =...
chassis
positive
436,890
public InputStream post(final Map<String, String> mapOfCookie, final Map<?, ?> mapOfParameter) throws IOException { if (null == mapOfCookie) { return; } this.mapOfCookie.putAll(mapOfCookie); if (mapOfParameter == null) { return; } for (final Iterator<?> aIterator = mapOfParameter.entrySet().iterator(); aIterator.hasNex...
public InputStream post(final Map<String, String> mapOfCookie, final Map<?, ?> mapOfParameter) throws IOException { if (null == mapOfCookie) { return; } this.mapOfCookie.putAll(mapOfCookie); <DeepExtract> if (mapOfParameter == null) { return; } for (final Iterator<?> aIterator = mapOfParameter.entrySet().iterator(); aI...
Unicorn
positive
436,891
protected int getByte(int group) { String hexValue = new String(raw); return Integer.parseInt(hexValue.substring(group * 2, (group + 1) * 2), 16); }
protected int getByte(int group) { <DeepExtract> String hexValue = new String(raw); return Integer.parseInt(hexValue.substring(group * 2, (group + 1) * 2), 16); </DeepExtract> }
OBD2
positive
436,893
@Override public String render(Object o, String format, Locale locale, Map<String, Object> model) { return property1.toString() + ", " + property2.toString(); }
@Override public String render(Object o, String format, Locale locale, Map<String, Object> model) { <DeepExtract> return property1.toString() + ", " + property2.toString(); </DeepExtract> }
jmte
positive
436,894
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_info); mContext = this; tv_name = (TextView) findViewById(R.id.tv_name); tv_distance = (TextView) findViewById(R.id.tv_distance); tv_area = (TextView) findViewById(R.id.tv_area); tv_addr =...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_info); mContext = this; tv_name = (TextView) findViewById(R.id.tv_name); tv_distance = (TextView) findViewById(R.id.tv_distance); tv_area = (TextView) findViewById(R.id.tv_area); tv_addr =...
CarApp
positive
436,895
@Override public void displayMenuActions(List<? extends MenuAction> actions) { this.actions = actions; runOnUiThread(() -> { menu.clear(); for (int id = 0; id < actions.size(); id++) { MenuAction action = actions.get(id); boolean enabled = action.isEnabled(); MenuItem menuItem = menu.add(Menu.NONE, id, Menu.NONE, actio...
@Override public void displayMenuActions(List<? extends MenuAction> actions) { this.actions = actions; <DeepExtract> runOnUiThread(() -> { menu.clear(); for (int id = 0; id < actions.size(); id++) { MenuAction action = actions.get(id); boolean enabled = action.isEnabled(); MenuItem menuItem = menu.add(Menu.NONE, id, Me...
librus-client
positive
436,896
@Test public void testTransactionRollback(TestContext ctx) throws Exception { SqlConnection conn = connection(); conn.begin().onComplete(ctx.asyncAssertSuccess(tx -> { String sql = "INSERT INTO insert_table VALUES (?, ?, ?, ?);"; LocalDate expected = LocalDate.of(2002, 2, 2); conn.preparedQuery(sql).execute(Tuple.of(0,...
@Test public void testTransactionRollback(TestContext ctx) throws Exception { <DeepExtract> SqlConnection conn = connection(); conn.begin().onComplete(ctx.asyncAssertSuccess(tx -> { String sql = "INSERT INTO insert_table VALUES (?, ?, ?, ?);"; LocalDate expected = LocalDate.of(2002, 2, 2); conn.preparedQuery(sql).execu...
vertx-jdbc-client
positive
436,897
@Override public Flow create(String name) { if (!NodePath.validate(name)) { String message = "Illegal flow name {0}, the length cannot over 100 and '*' ',' is not available"; throw new ArgumentException(message, name); } String userId = sessionManager.getUserId(); Flow flow = flowDao.findByName(name); if (flow != null ...
@Override public Flow create(String name) { if (!NodePath.validate(name)) { String message = "Illegal flow name {0}, the length cannot over 100 and '*' ',' is not available"; throw new ArgumentException(message, name); } String userId = sessionManager.getUserId(); Flow flow = flowDao.findByName(name); if (flow != null ...
flow-platform-x
positive
436,900
public byte[] getHeader() throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); for (int i = 0; i < fileID.length; i++) { char c = fileID[i]; bos.write(c); } byte[] buf = new byte[4]; buf[3] = (byte) (fileLength >> 24); buf[2] = (byte) ((fileLength << 8) >> 24); buf[1] = (byte) ((fileLength << 1...
public byte[] getHeader() throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); for (int i = 0; i < fileID.length; i++) { char c = fileID[i]; bos.write(c); } byte[] buf = new byte[4]; buf[3] = (byte) (fileLength >> 24); buf[2] = (byte) ((fileLength << 8) >> 24); buf[1] = (byte) ((fileLength << 1...
VideoMergeDemo
positive
436,902
public void saveSelectedProjectInMultipleFiles(String projName, boolean saveCurrentCalc, boolean showSuccess) { if (projName == null || projName.isEmpty() || !this.projectDict.containsKey(projName)) { return; } File wsDir; if (workSpacePath == null) wsDir = null; File wsDir = new File(workSpacePath); if (wsDir.canWrite...
public void saveSelectedProjectInMultipleFiles(String projName, boolean saveCurrentCalc, boolean showSuccess) { if (projName == null || projName.isEmpty() || !this.projectDict.containsKey(projName)) { return; } File wsDir; if (workSpacePath == null) wsDir = null; File wsDir = new File(workSpacePath); if (wsDir.canWrite...
quantumVITAS
positive
436,903
public final LC debug(int repaintMillis) { this.debugMillis = repaintMillis; return this; }
public final LC debug(int repaintMillis) { <DeepExtract> this.debugMillis = repaintMillis; </DeepExtract> return this; }
BurpFlashCSRFBuilder
positive
436,907
protected void onConnected() { String baseUrl = connection.getConfig().baseUrl(); log.info("Connecting to Twitch IRC {}", baseUrl); if (!connection.getConnectionState().equals(WebsocketConnectionState.CONNECTED) && !connection.getConnectionState().equals(WebsocketConnectionState.CONNECTING)) { return false; } if (true)...
protected void onConnected() { String baseUrl = connection.getConfig().baseUrl(); log.info("Connecting to Twitch IRC {}", baseUrl); if (!connection.getConnectionState().equals(WebsocketConnectionState.CONNECTED) && !connection.getConnectionState().equals(WebsocketConnectionState.CONNECTING)) { return false; } if (true)...
twitch4j
positive
436,909
public com.google.protobuf.Duration getDurationValue() { if (valueCase_ == 8) { return (com.google.protobuf.Duration) value_; } return DEFAULT_INSTANCE; }
public com.google.protobuf.Duration getDurationValue() { if (valueCase_ == 8) { return (com.google.protobuf.Duration) value_; } <DeepExtract> return DEFAULT_INSTANCE; </DeepExtract> }
cellery-security
positive
436,910
public int[] heapSort(int[] values) { for (int i = 0; i < values.length; i++) { Node<T> node = add(values[i]); } int[] sorted = new int[values.length]; for (int i = sorted.length - 1; i >= 0; i--) { sorted[i] = (int) remove(); } return sorted; }
public int[] heapSort(int[] values) { <DeepExtract> for (int i = 0; i < values.length; i++) { Node<T> node = add(values[i]); } </DeepExtract> int[] sorted = new int[values.length]; for (int i = sorted.length - 1; i >= 0; i--) { sorted[i] = (int) remove(); } return sorted; }
data-structures-in-java
positive
436,913
@Override public ApiResponse<EmojiList> autocompleteEmoji(String name) { QueryBuilder query = new QueryBuilder().set("name", name); return doApiRequest(HttpMethod.GET, apiUrl + getEmojisRoute() + "/autocomplete" + query.toString(), null, null, EmojiList.class); }
@Override public ApiResponse<EmojiList> autocompleteEmoji(String name) { QueryBuilder query = new QueryBuilder().set("name", name); <DeepExtract> return doApiRequest(HttpMethod.GET, apiUrl + getEmojisRoute() + "/autocomplete" + query.toString(), null, null, EmojiList.class); </DeepExtract> }
mattermost4j
positive
436,916
public Criteria andSalaryLessThan(BigDecimal value) { if (value == null) { throw new RuntimeException("Value for " + "salary" + " cannot be null"); } criteria.add(new Criterion("salary <", value)); return (Criteria) this; }
public Criteria andSalaryLessThan(BigDecimal value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "salary" + " cannot be null"); } criteria.add(new Criterion("salary <", value)); </DeepExtract> return (Criteria) this; }
CuitJavaEEPractice
positive
436,917
public byte[] decrypt(byte[] ciphertext, byte[] key) { AES aes = new AES(key); int blockLength = aes.getBlockLength(); IncrementalNonce nonce = new IncrementalNonce(blockLength - NONCE_LENTH, 8); int totalBlocks = arrayUtils.countBlocks(ciphertext, blockLength); byte[] result = new byte[ciphertext.length]; for (int i =...
public byte[] decrypt(byte[] ciphertext, byte[] key) { <DeepExtract> AES aes = new AES(key); int blockLength = aes.getBlockLength(); IncrementalNonce nonce = new IncrementalNonce(blockLength - NONCE_LENTH, 8); int totalBlocks = arrayUtils.countBlocks(ciphertext, blockLength); byte[] result = new byte[ciphertext.length]...
matasano-cryptopals-solutions
positive
436,918
public static Expr getListArg(Expr expr) { Expr value = expr.getNonNote(); if (value.tag == Tags.APPLICATION) { Constructors.Application application = (Constructors.Application) value; Expr applied = application.base.getNonNote(); if (applied.tag == Tags.BUILT_IN && ((Constructors.BuiltIn) applied).name.equals("List"))...
public static Expr getListArg(Expr expr) { <DeepExtract> Expr value = expr.getNonNote(); if (value.tag == Tags.APPLICATION) { Constructors.Application application = (Constructors.Application) value; Expr applied = application.base.getNonNote(); if (applied.tag == Tags.BUILT_IN && ((Constructors.BuiltIn) applied).name.e...
dhallj
positive
436,920
@Test public void handle_withMessage0x0012_notifiesOnVelocityUpdate() { return new TotalVelocitySubscription() { @Override protected void onVelocityUpdated(double velocity) { internalSubscription.onVelocityUpdated(velocity); } }; subscription.handle(new DataMemoryMessage(M_S_LOW_TOTAL.getLocation(), 0x00, 0x12)); inter...
@Test public void handle_withMessage0x0012_notifiesOnVelocityUpdate() { return new TotalVelocitySubscription() { @Override protected void onVelocityUpdated(double velocity) { internalSubscription.onVelocityUpdated(velocity); } }; subscription.handle(new DataMemoryMessage(M_S_LOW_TOTAL.getLocation(), 0x00, 0x12)); <Deep...
waterrower-core
positive
436,922
@Override public void valueChanged(ListSelectionEvent e) { enableDisableLocalMenu(); enableDisableRemoteMenu(); enableDisableDiffMenu(); }
@Override public void valueChanged(ListSelectionEvent e) { <DeepExtract> enableDisableLocalMenu(); enableDisableRemoteMenu(); enableDisableDiffMenu(); </DeepExtract> }
swift-explorer
positive
436,923
protected void updateRule() { rule = new SearchRule(title.getText()); historyDirty = true; final Object[] objects = listeners.getListeners(); for (final Object object : objects) { final ISearchPanelListener listener = (ISearchPanelListener) object; listener.ruleChanged(rule); } }
protected void updateRule() { rule = new SearchRule(title.getText()); <DeepExtract> historyDirty = true; final Object[] objects = listeners.getListeners(); for (final Object object : objects) { final ISearchPanelListener listener = (ISearchPanelListener) object; listener.ruleChanged(rule); } </DeepExtract> }
glance
positive
436,924
@Override public void onRefreshBusNearby(List<MrNearbyBus> list) { if (isFirstUpdate) { progress.dismiss(); isFirstUpdate = false; } for (int i = 0; i < list.size(); i++) { LogUtils.i(TAG, list.get(i).getBusName()); } if (busNearAdapter == null) { busNearAdapter = new BusNearAdapter(getActivity(), list); mBusNearListVi...
@Override public void onRefreshBusNearby(List<MrNearbyBus> list) { if (isFirstUpdate) { progress.dismiss(); isFirstUpdate = false; } for (int i = 0; i < list.size(); i++) { LogUtils.i(TAG, list.get(i).getBusName()); } if (busNearAdapter == null) { busNearAdapter = new BusNearAdapter(getActivity(), list); mBusNearListVi...
Busleep
positive
436,925
public void actionPerformed(java.awt.event.ActionEvent evt) { if (jtPaginas.getText().equals("")) { JOptionPane.showMessageDialog(this, "Debe completar el campo 'Páginas'"); } else { int pag = 0; try { pag = Integer.parseInt(jtPaginas.getText()); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(this, ...
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> if (jtPaginas.getText().equals("")) { JOptionPane.showMessageDialog(this, "Debe completar el campo 'Páginas'"); } else { int pag = 0; try { pag = Integer.parseInt(jtPaginas.getText()); } catch (NumberFormatException e) { JOptionPane.showMessag...
Diplo_NT_Intro_Programacion
positive
436,926
public void setChoixLongitude(double choixLongitude) { double ancienneValeur = this.choixLongitude; this.choixLongitude = choixLongitude; double nouvelleValeur = this.choixLongitude; if (ancienneValeur != null && nouvelleValeur != null && ancienneValeur.compareTo(nouvelleValeur) == 0) { return; } changeSupport.fireProp...
public void setChoixLongitude(double choixLongitude) { double ancienneValeur = this.choixLongitude; this.choixLongitude = choixLongitude; double nouvelleValeur = this.choixLongitude; <DeepExtract> if (ancienneValeur != null && nouvelleValeur != null && ancienneValeur.compareTo(nouvelleValeur) == 0) { return; } changeSu...
editeurPanovisu
positive
436,928
protected boolean isLookbehindValid() { if (this instanceof Quantifier) { hasOnlyMinMax = false; numberQuantifier++; } else if (this instanceof MatchMinMax || this instanceof MatchMinMaxGreedy) { numberQuantifier++; } for (Node child : this.getChildrens()) { checkQuantifiers(child); } return hasOnlyMinMax || (numberQua...
protected boolean isLookbehindValid() { <DeepExtract> if (this instanceof Quantifier) { hasOnlyMinMax = false; numberQuantifier++; } else if (this instanceof MatchMinMax || this instanceof MatchMinMaxGreedy) { numberQuantifier++; } for (Node child : this.getChildrens()) { checkQuantifiers(child); } </DeepExtract> retur...
RegexGenerator
positive
436,929
public Term[] cloneTerms(final Term... additional) { if (term == null) { return null; } final int L = term.length + additional.length; if (L == 0) return term; final Term[] arr = new Term[L]; int i; int j = 0; Term[] srcArray = term; for (i = 0; i < L; i++) { if (i == term.length) { srcArray = additional; j = 0; } arr[...
public Term[] cloneTerms(final Term... additional) { <DeepExtract> if (term == null) { return null; } final int L = term.length + additional.length; if (L == 0) return term; final Term[] arr = new Term[L]; int i; int j = 0; Term[] srcArray = term; for (i = 0; i < L; i++) { if (i == term.length) { srcArray = additional;...
opennars
positive
436,930
@Override public void onLoaderLoadingStart(Loader __loader) { if (onLoadingStartListener != null) onLoadingStartListener.onRemoteImageLoaderLoadingStart(this); }
@Override public void onLoaderLoadingStart(Loader __loader) { <DeepExtract> if (onLoadingStartListener != null) onLoadingStartListener.onRemoteImageLoaderLoadingStart(this); </DeepExtract> }
android-libs
positive
436,931
public int textZoom() { if (textZoom == null) { try { textZoom = prefs.getInt(TEXT_ZOOM, TEXT_ZOOM_DEFAULT); } catch (ClassCastException e) { Log.w(TAG, "Preference textZoom() was reset due to wrong type stored as an INT variable...", e); setTextZoom(TEXT_ZOOM_DEFAULT); textZoom = prefs.getInt(TEXT_ZOOM, TEXT_ZOOM_DEFA...
public int textZoom() { if (textZoom == null) { try { textZoom = prefs.getInt(TEXT_ZOOM, TEXT_ZOOM_DEFAULT); } catch (ClassCastException e) { Log.w(TAG, "Preference textZoom() was reset due to wrong type stored as an INT variable...", e); setTextZoom(TEXT_ZOOM_DEFAULT); textZoom = prefs.getInt(TEXT_ZOOM, TEXT_ZOOM_DEFA...
ttrss-reader-fork
positive
436,933
protected void restartTx(boolean success) { if (success) { tx.success(); } else { tx.failure(); } tx.finish(); if (tx == null) { tx = graphDb.beginTx(); } return tx; }
protected void restartTx(boolean success) { if (success) { tx.success(); } else { tx.failure(); } tx.finish(); <DeepExtract> if (tx == null) { tx = graphDb.beginTx(); } return tx; </DeepExtract> }
graph-collections
positive
436,934
private void setBase(String series, Object x, Object y) { for (Object object : ((javafx.scene.chart.XYChart) body).getData()) { javafx.scene.chart.XYChart.Series s = (javafx.scene.chart.XYChart.Series) object; if (s.getName().equals(series)) { for (Object o : s.getData()) { javafx.scene.chart.XYChart.Data datum = (java...
private void setBase(String series, Object x, Object y) { for (Object object : ((javafx.scene.chart.XYChart) body).getData()) { javafx.scene.chart.XYChart.Series s = (javafx.scene.chart.XYChart.Series) object; if (s.getName().equals(series)) { for (Object o : s.getData()) { javafx.scene.chart.XYChart.Data datum = (java...
xbrowser
positive
436,936
public Revision[] newPages(int amount, int rcoptions, int... ns) throws IOException { StringBuilder url = new StringBuilder(query); url.append("list=recentchanges&rcprop=title%7Cids%7Cuser%7Ctimestamp%7Cflags%7Ccomment%7Csizes&rclimit=max"); constructNamespaceString(url, "rc", ns); if (true) url.append("&rctype=new"); ...
public Revision[] newPages(int amount, int rcoptions, int... ns) throws IOException { <DeepExtract> StringBuilder url = new StringBuilder(query); url.append("list=recentchanges&rcprop=title%7Cids%7Cuser%7Ctimestamp%7Cflags%7Ccomment%7Csizes&rclimit=max"); constructNamespaceString(url, "rc", ns); if (true) url.append("&...
Mediawiki-Japi
positive
436,937
@Override public void onUpdate() { super.onUpdate(); if (shootingEntity != null) { distanceX = shootingEntity.posX - posX; distanceY = shootingEntity.posY - posY; distanceZ = shootingEntity.posZ - posZ; distanceTotal = Math.sqrt(distanceX * distanceX + distanceY * distanceY + distanceZ * distanceZ); if (distanceTotal >...
@Override public void onUpdate() { super.onUpdate(); if (shootingEntity != null) { distanceX = shootingEntity.posX - posX; distanceY = shootingEntity.posY - posY; distanceZ = shootingEntity.posZ - posZ; distanceTotal = Math.sqrt(distanceX * distanceX + distanceY * distanceY + distanceZ * distanceZ); if (distanceTotal >...
balkons-weaponmod
positive
436,940
public boolean isIXIndirection() { if (type != EXPRESSION_PARENTHESIS) return false; Expression exp = args.get(0); if (isRegister() && this.registerOrFlagName.equalsIgnoreCase("ix")) return true; if (args == null) return false; for (Expression arg : args) { if (arg.containsRegister("ix")) return true; } return false; }
public boolean isIXIndirection() { if (type != EXPRESSION_PARENTHESIS) return false; Expression exp = args.get(0); <DeepExtract> if (isRegister() && this.registerOrFlagName.equalsIgnoreCase("ix")) return true; if (args == null) return false; for (Expression arg : args) { if (arg.containsRegister("ix")) return true; } r...
mdlz80optimizer
positive
436,941
public void requestUserTimeline(final User user, final Handler<Tweet> handler) throws TwitterClientException { StringBuilder sb = new StringBuilder(TwitterAPI.STATUSES_USER_TIMELINE_URL).append(".json").append("?"); if (null == user.getId()) { sb.append(TwitterAPI.SCREEN_NAME).append("=").append(user.getScreenName()); ...
public void requestUserTimeline(final User user, final Handler<Tweet> handler) throws TwitterClientException { StringBuilder sb = new StringBuilder(TwitterAPI.STATUSES_USER_TIMELINE_URL).append(".json").append("?"); if (null == user.getId()) { sb.append(TwitterAPI.SCREEN_NAME).append("=").append(user.getScreenName()); ...
twitlogic
positive
436,943
public Block allocate(Identifier blockCode, int size) { if (!allocatorInitialised) { for (Block block : sorted) { allocator.declareAllocated(block.header.address, block.header.size); } allocatorInitialised = true; } long address = allocator.alloc(size); CDataReadWriteAccess rwAccess = CDataReadWriteAccess.create(new by...
public Block allocate(Identifier blockCode, int size) { if (!allocatorInitialised) { for (Block block : sorted) { allocator.declareAllocated(block.header.address, block.header.size); } allocatorInitialised = true; } long address = allocator.alloc(size); CDataReadWriteAccess rwAccess = CDataReadWriteAccess.create(new by...
org.cakelab.blender.io
positive
436,944
public boolean add(T x) { if (n + 1 > a.length) resize(); a[n++] = x; int p = parent(n - 1); while (n - 1 > 0 && c.compare(a[n - 1], a[p]) < 0) { swap(n - 1, p); n - 1 = p; p = parent(n - 1); } return true; }
public boolean add(T x) { if (n + 1 > a.length) resize(); a[n++] = x; <DeepExtract> int p = parent(n - 1); while (n - 1 > 0 && c.compare(a[n - 1], a[p]) < 0) { swap(n - 1, p); n - 1 = p; p = parent(n - 1); } </DeepExtract> return true; }
Carleton-University-CS-Guide
positive
436,945
private Subscription getSubscription(String ticker, SubscriptionBuilder builder) { CorrelationID id = session.getNextCorrelationId(); SubscriptionHolder sh = new SubscriptionHolder(id); logger.debug("Correlation id for {}: {}", ticker, sh.id); fields.addAll(builder.getFields()); listeners.addAll(builder.getListeners())...
private Subscription getSubscription(String ticker, SubscriptionBuilder builder) { CorrelationID id = session.getNextCorrelationId(); SubscriptionHolder sh = new SubscriptionHolder(id); logger.debug("Correlation id for {}: {}", ticker, sh.id); fields.addAll(builder.getFields()); listeners.addAll(builder.getListeners())...
jBloomberg
positive
436,947
private void cleanSubject(InvocationContext invocationContext, HttpServletRequest request, HttpServletResponse response, HttpMessageContext httpMessageContext) throws Exception { RememberMeIdentityStore rememberMeIdentityStore = CdiUtils.getBeanReference(RememberMeIdentityStore.class); RememberMe rememberMeAnnotation; ...
private void cleanSubject(InvocationContext invocationContext, HttpServletRequest request, HttpServletResponse response, HttpMessageContext httpMessageContext) throws Exception { RememberMeIdentityStore rememberMeIdentityStore = CdiUtils.getBeanReference(RememberMeIdentityStore.class); <DeepExtract> RememberMe remember...
soteria
positive
436,949
public static Chat[] getAllBookmarkedChats() throws SkypeException { try { String command = "SEARCH " + "BOOKMARKEDCHATS"; String responseHeader = "CHATS "; String response = Connector.getInstance().execute(command, responseHeader); String data = response.substring(responseHeader.length()); String[] ids = Utils.convert...
public static Chat[] getAllBookmarkedChats() throws SkypeException { <DeepExtract> try { String command = "SEARCH " + "BOOKMARKEDCHATS"; String responseHeader = "CHATS "; String response = Connector.getInstance().execute(command, responseHeader); String data = response.substring(responseHeader.length()); String[] ids =...
skype-im-plugin
positive
436,950
@Test @Enqueue("demo/entries_nyancat.json") public void fetchEntry() { assertThat(client.fetch(CDAEntry.class).one("nyancat").id()).isEqualTo("nyancat"); assertThat(client.fetch(CDAEntry.class).one("nyancat").<String>getField("name")).isEqualTo("Nyan Cat"); assertThat(client.fetch(CDAEntry.class).one("nyancat").<String...
@Test @Enqueue("demo/entries_nyancat.json") public void fetchEntry() { <DeepExtract> assertThat(client.fetch(CDAEntry.class).one("nyancat").id()).isEqualTo("nyancat"); assertThat(client.fetch(CDAEntry.class).one("nyancat").<String>getField("name")).isEqualTo("Nyan Cat"); assertThat(client.fetch(CDAEntry.class).one("nya...
contentful.java
positive
436,951
public static boolean isValidBST(TreeNode root) { if (root == null) return true; if (null != null && root.val <= null) return false; if (null != null && root.val >= null) return false; return help(root.left, null, root.val) && help(root.right, root.val, null); }
public static boolean isValidBST(TreeNode root) { <DeepExtract> if (root == null) return true; if (null != null && root.val <= null) return false; if (null != null && root.val >= null) return false; return help(root.left, null, root.val) && help(root.right, root.val, null); </DeepExtract> }
algorithm-tutorial
positive
436,952
public void showAsStartCircleWithouEnd(CalendarView calendarView, boolean animate) { if (animate) { clearVariables(); } this.calendarView = calendarView; selectionState = SelectionState.START_RANGE_DAY_WITHOUT_END; this.circleColor = calendarView.getSelectedDayBackgroundStartColor(); animationProgress = 100; setWidth(C...
public void showAsStartCircleWithouEnd(CalendarView calendarView, boolean animate) { if (animate) { clearVariables(); } this.calendarView = calendarView; selectionState = SelectionState.START_RANGE_DAY_WITHOUT_END; <DeepExtract> this.circleColor = calendarView.getSelectedDayBackgroundStartColor(); animationProgress = 1...
CosmoCalendar
positive
436,954
@Override public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { if (status == BluetoothGatt.GATT_SUCCESS) broadcastUpdate(characteristic, ITEM_TYPE_READ); readyForRequest = true; if (readyForRequest) { readyForRequest = false; BLEQueue.QueueAction queueItem = ble...
@Override public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { if (status == BluetoothGatt.GATT_SUCCESS) broadcastUpdate(characteristic, ITEM_TYPE_READ); readyForRequest = true; <DeepExtract> if (readyForRequest) { readyForRequest = false; BLEQueue.QueueAction q...
Android-u-blox-BLE
positive
436,955
public void onFinish() { if (timer != null) { timer.cancel(); } if (callUpdateDialog != null) { callUpdateDialog.dismissAllowingStateLoss(); } LinphoneCall call = LinphoneManager.getLc().getCurrentCall(); if (call == null) { return; } LinphoneCallParams params = call.getCurrentParamsCopy(); if (false) { params.setVideo...
public void onFinish() { <DeepExtract> if (timer != null) { timer.cancel(); } if (callUpdateDialog != null) { callUpdateDialog.dismissAllowingStateLoss(); } LinphoneCall call = LinphoneManager.getLc().getCurrentCall(); if (call == null) { return; } LinphoneCallParams params = call.getCurrentParamsCopy(); if (false) { p...
linphone-android
positive
436,956
public boolean setCurveBackend(AlgDncBackend alg_dnc_backend) { DNC_BACKEND.checkDependencies(); if (DNC_BACKEND == alg_dnc_backend) { return false; } DNC_BACKEND = alg_dnc_backend; return true; }
public boolean setCurveBackend(AlgDncBackend alg_dnc_backend) { <DeepExtract> DNC_BACKEND.checkDependencies(); </DeepExtract> if (DNC_BACKEND == alg_dnc_backend) { return false; } DNC_BACKEND = alg_dnc_backend; return true; }
DNC
positive
436,957
private void updateRate(MouseEvent event) { Point2D mouse = new Point2D(event.getSceneX(), event.getSceneY()); javafx.geometry.Point2D p = this.localToScene(new javafx.geometry.Point2D(5, 5)); Point2D controlCenter = new Point2D(p.getX(), p.getY()); Point2D vec = mouse.getSubtraction(controlCenter); setRotate(-AngleUti...
private void updateRate(MouseEvent event) { Point2D mouse = new Point2D(event.getSceneX(), event.getSceneY()); javafx.geometry.Point2D p = this.localToScene(new javafx.geometry.Point2D(5, 5)); Point2D controlCenter = new Point2D(p.getX(), p.getY()); Point2D vec = mouse.getSubtraction(controlCenter); <DeepExtract> setRo...
alchemist
positive
436,958
public static String sendPostHttpAddHeader(String path, HashMap<String, String> headerMap) { List<NameValuePair> paramsList = new ArrayList<NameValuePair>(); if (null != null) { for (Entry<String, String> entry : null.entrySet()) { paramsList.add(new BasicNameValuePair(entry.getKey(), entry.getValue())); } } CloseableH...
public static String sendPostHttpAddHeader(String path, HashMap<String, String> headerMap) { <DeepExtract> List<NameValuePair> paramsList = new ArrayList<NameValuePair>(); if (null != null) { for (Entry<String, String> entry : null.entrySet()) { paramsList.add(new BasicNameValuePair(entry.getKey(), entry.getValue())); ...
harrier
positive
436,961
@Override public net.media.openrtb25.request.Regs map(Regs source, Config config, Provider converterProvider) { if (source == null) { return null; } net.media.openrtb25.request.Regs regs1 = new net.media.openrtb25.request.Regs(); if (source == null || regs1 == null) { return; } regs1.setCoppa(source.getCoppa()); Map<St...
@Override public net.media.openrtb25.request.Regs map(Regs source, Config config, Provider converterProvider) { if (source == null) { return null; } net.media.openrtb25.request.Regs regs1 = new net.media.openrtb25.request.Regs(); <DeepExtract> if (source == null || regs1 == null) { return; } regs1.setCoppa(source.getCo...
openrtb3-converter
positive
436,964
public static void main(String[] args) throws Exception { final File testFile = new File(System.getProperty("user.home") + "/Desktop/" + "ClassyShark.jar"); String textClass = "com.google.classyshark.gui.panel.reducer.Reducer.class"; Translator sourceGenerator = TranslatorFactory.createTranslator(textClass, testFile); ...
public static void main(String[] args) throws Exception { final File testFile = new File(System.getProperty("user.home") + "/Desktop/" + "ClassyShark.jar"); String textClass = "com.google.classyshark.gui.panel.reducer.Reducer.class"; Translator sourceGenerator = TranslatorFactory.createTranslator(textClass, testFile); ...
android-classyshark
positive
436,965
public static LiteInterface getLiteInterface() { if (null == sMe) { sMe = new BaseLitePrefs(); } return this; }
public static LiteInterface getLiteInterface() { if (null == sMe) { sMe = new BaseLitePrefs(); } <DeepExtract> return this; </DeepExtract> }
PureNote
positive
436,966
private void addTableView() { tableView = new TableView(this); msp.addSliceListener(tableView); BdvHandleHelper.addCard(bdvh, "Slices Display", tableView.getPanel(), true); extraCleanUp.add(() -> { tableView.cleanup(); if (msp != null) { msp.removeSliceListener(tableView); } }); }
private void addTableView() { tableView = new TableView(this); msp.addSliceListener(tableView); BdvHandleHelper.addCard(bdvh, "Slices Display", tableView.getPanel(), true); <DeepExtract> extraCleanUp.add(() -> { tableView.cleanup(); if (msp != null) { msp.removeSliceListener(tableView); } }); </DeepExtract> }
ijp-imagetoatlas
positive
436,967
@Test public void sendRESPMODWithGetRequestNoBodyThroughCodecPipeline() { runSocketTest(new SendRESPMODWithGetRequestNoBodyServerHandler(), new SendRESPMODWithGetRequestNoBodyClientHandler(), new Object[] { DataMockery.createRESPMODWithGetRequestNoBodyIcapMessage() }, PipelineType.CODEC); }
@Test public void sendRESPMODWithGetRequestNoBodyThroughCodecPipeline() { <DeepExtract> runSocketTest(new SendRESPMODWithGetRequestNoBodyServerHandler(), new SendRESPMODWithGetRequestNoBodyClientHandler(), new Object[] { DataMockery.createRESPMODWithGetRequestNoBodyIcapMessage() }, PipelineType.CODEC); </DeepExtract> }
netty-icap
positive
436,969