before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@Test public void changeBucketPlanTestNoQuota() throws Exception { PowerMockito.mockStatic(BucketAction.class); ObjectBucketInfo bucket = new ObjectBucketInfo(); bucket.setSearchMetadataList(null); PowerMockito.when(BucketAction.class, GET, same(connection), anyString(), anyString()).thenReturn(bucket); PowerMockito.mo...
@Test public void changeBucketPlanTestNoQuota() throws Exception { PowerMockito.mockStatic(BucketAction.class); ObjectBucketInfo bucket = new ObjectBucketInfo(); bucket.setSearchMetadataList(null); PowerMockito.when(BucketAction.class, GET, same(connection), anyString(), anyString()).thenReturn(bucket); PowerMockito.mo...
ecs-cf-service-broker
positive
436,071
public Criteria andFzGroupnameIsNull() { if ("fz_groupname is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("fz_groupname is null")); return (Criteria) this; }
public Criteria andFzGroupnameIsNull() { <DeepExtract> if ("fz_groupname is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("fz_groupname is null")); </DeepExtract> return (Criteria) this; }
webim
positive
436,072
@Test public void testInsertTOCMacro() { typeText("Title 1"); applyStyleTitle1(); typeEnter(); typeText("Title 2"); applyStyleTitle2(); moveCaret("document.body.getElementsByTagName('h1')[0].firstChild", 7); typeEnter(); openSelectMacroDialog(); waitForMacroListItem("Table Of Contents", true); getSelenium().click(getMa...
@Test public void testInsertTOCMacro() { typeText("Title 1"); applyStyleTitle1(); typeEnter(); typeText("Title 2"); applyStyleTitle2(); moveCaret("document.body.getElementsByTagName('h1')[0].firstChild", 7); typeEnter(); openSelectMacroDialog(); waitForMacroListItem("Table Of Contents", true); getSelenium().click(getMa...
xwiki-enterprise
positive
436,073
private Node moveRedRight(Node h) { h.color = !h.color; h.left.color = !h.left.color; h.right.color = !h.right.color; if (isRed(h.left.left)) { h = rotateRight(h); flipColors(h); } return h; }
private Node moveRedRight(Node h) { <DeepExtract> h.color = !h.color; h.left.color = !h.left.color; h.right.color = !h.right.color; </DeepExtract> if (isRed(h.left.left)) { h = rotateRight(h); flipColors(h); } return h; }
skeleton-fa20
positive
436,074
public void releaseBrokenResourceToPool(Jedis jedis) { if (jedis == null) return; logger.debug("returning jedis: " + jedis.toString() + " to pool -> isBroken: " + true); JedisPool pool = checkedOutJedises.get(jedis); if (pool != null) { synchronized (jedis) { if (true) { pool.returnBrokenResource(jedis); } else { pool....
public void releaseBrokenResourceToPool(Jedis jedis) { <DeepExtract> if (jedis == null) return; logger.debug("returning jedis: " + jedis.toString() + " to pool -> isBroken: " + true); JedisPool pool = checkedOutJedises.get(jedis); if (pool != null) { synchronized (jedis) { if (true) { pool.returnBrokenResource(jedis); ...
janrain-backplane-2
positive
436,075
public VPackBuilder addTagged(final String attribute, final long tag, final Character value) throws VPackBuilderException { if (attribute != null) { boolean haveReported = false; if (!stack.isEmpty()) { final byte head = head(); if (head != 0x0b && head != 0x14) { throw new VPackBuilderNeedOpenObjectException(); } if (...
public VPackBuilder addTagged(final String attribute, final long tag, final Character value) throws VPackBuilderException { <DeepExtract> if (attribute != null) { boolean haveReported = false; if (!stack.isEmpty()) { final byte head = head(); if (head != 0x0b && head != 0x14) { throw new VPackBuilderNeedOpenObjectExcep...
java-velocypack
positive
436,077
private int getMarkerResource(String str_date, String iconName) { long time; try { java.text.DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); java.util.Date date = formatter.parse(str_date); java.sql.Timestamp timeStampDate = new Timestamp(date.getTime()); time = timeStampDate.getTime() / 1000; } cat...
private int getMarkerResource(String str_date, String iconName) { <DeepExtract> long time; try { java.text.DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); java.util.Date date = formatter.parse(str_date); java.sql.Timestamp timeStampDate = new Timestamp(date.getTime()); time = timeStampDate.getTime()...
memetro-android-app
positive
436,078
public void close() { isHandlerDismiss = true; if (isDismiss) { return; } isDismiss = true; try { dismissAllowingStateLoss(); } catch (Exception e) { e.printStackTrace(); } }
public void close() { isHandlerDismiss = true; <DeepExtract> if (isDismiss) { return; } isDismiss = true; try { dismissAllowingStateLoss(); } catch (Exception e) { e.printStackTrace(); } </DeepExtract> }
AndroidCommonLibrary
positive
436,079
@NotNull @Contract(pure = true) public static <T> T initializeFromClass(@NotNull Class<?> clazz, @NotNull Class<? extends T> superClass, @NotNull Class<?>... furtherSuperClasses) { try { final Constructor<? extends T> declaredConstructor = requireSuperClass(clazz, superClass, furtherSuperClasses).getDeclaredConstructor...
@NotNull @Contract(pure = true) public static <T> T initializeFromClass(@NotNull Class<?> clazz, @NotNull Class<? extends T> superClass, @NotNull Class<?>... furtherSuperClasses) { <DeepExtract> try { final Constructor<? extends T> declaredConstructor = requireSuperClass(clazz, superClass, furtherSuperClasses).getDecla...
storm-crawler
positive
436,081
public synchronized void rawGet(int index) { if (!isOpenInternal()) { throw new IllegalStateException("Lua state is closed"); } LuaValueProxyRef luaValueProxyRef; while ((luaValueProxyRef = (LuaValueProxyRef) proxyQueue.poll()) != null) { proxySet.remove(luaValueProxyRef); lua_unref(REGISTRYINDEX, luaValueProxyRef.getR...
public synchronized void rawGet(int index) { <DeepExtract> if (!isOpenInternal()) { throw new IllegalStateException("Lua state is closed"); } LuaValueProxyRef luaValueProxyRef; while ((luaValueProxyRef = (LuaValueProxyRef) proxyQueue.poll()) != null) { proxySet.remove(luaValueProxyRef); lua_unref(REGISTRYINDEX, luaValu...
jnlua
positive
436,082
public void init() { ViewGroup.LayoutParams framelayout_params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); mFrameLayout = new FrameLayout(this); mFrameLayout.setLayoutParams(framelayout_params); ViewGroup.LayoutParams edittext_layout_params = new ViewGroup.Lay...
public void init() { ViewGroup.LayoutParams framelayout_params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); mFrameLayout = new FrameLayout(this); mFrameLayout.setLayoutParams(framelayout_params); ViewGroup.LayoutParams edittext_layout_params = new ViewGroup.Lay...
BrowserQuestLua
positive
436,083
public void prepare(@NonNull Uri uri, Long startPositionMs, @SRGStreamType int streamType, List<Segment> segments, Segment segment) { if (uri == null) { throw new IllegalArgumentException("Invalid argument: null uri"); } this.userSegmentList.clear(); playerTimeLine.update(C.TIME_UNSET, C.TIME_UNSET, false, 0L); if (seg...
public void prepare(@NonNull Uri uri, Long startPositionMs, @SRGStreamType int streamType, List<Segment> segments, Segment segment) { if (uri == null) { throw new IllegalArgumentException("Invalid argument: null uri"); } this.userSegmentList.clear(); playerTimeLine.update(C.TIME_UNSET, C.TIME_UNSET, false, 0L); if (seg...
srgmediaplayer-android
positive
436,085
@Override public FriendRecord value5(Timestamp value) { setValue(4, value); return this; }
@Override public FriendRecord value5(Timestamp value) { <DeepExtract> setValue(4, value); </DeepExtract> return this; }
BlocklyProp
positive
436,089
@Test(expected = IllegalArgumentException.class) public void testPositiveInfinity_CustomNumber() { return LongFraction.valueOf(new CustomNumber(Double.POSITIVE_INFINITY)); }
@Test(expected = IllegalArgumentException.class) public void testPositiveInfinity_CustomNumber() { <DeepExtract> return LongFraction.valueOf(new CustomNumber(Double.POSITIVE_INFINITY)); </DeepExtract> }
BigFraction
positive
436,090
@OwnerUser public static void startDeviceOwnerPostProvisioning(final Context context, final DevicePolicies policies) { final boolean owner = Users.isOwner(); if (SDK_INT >= O) { final Set<String> ids = Collections.singleton(AFFILIATION_ID); final Set<String> current_ids = policies.invoke(DevicePolicyManager::getAffilia...
@OwnerUser public static void startDeviceOwnerPostProvisioning(final Context context, final DevicePolicies policies) { <DeepExtract> final boolean owner = Users.isOwner(); if (SDK_INT >= O) { final Set<String> ids = Collections.singleton(AFFILIATION_ID); final Set<String> current_ids = policies.invoke(DevicePolicyManag...
island
positive
436,091
@Override public void suggestionSelected(TransportSuggestion s) { serverRpc.suggestionSelected(s.index); widget.removeSelectionChangeListener(this); suggesting = false; widget.setFocus(true); }
@Override public void suggestionSelected(TransportSuggestion s) { serverRpc.suggestionSelected(s.index); <DeepExtract> widget.removeSelectionChangeListener(this); suggesting = false; widget.setFocus(true); </DeepExtract> }
vaadin-aceeditor
positive
436,093
private void setupData(@NonNull Context context, @NonNull AttributeSet attributeSet) { TypedArray typedArray = context.obtainStyledAttributes(attributeSet, R.styleable.AboutCreator); Drawable headerImage = typedArray.getDrawable(R.styleable.AboutCreator_headerImage); Drawable profileImage = typedArray.getDrawable(R.sty...
private void setupData(@NonNull Context context, @NonNull AttributeSet attributeSet) { TypedArray typedArray = context.obtainStyledAttributes(attributeSet, R.styleable.AboutCreator); Drawable headerImage = typedArray.getDrawable(R.styleable.AboutCreator_headerImage); Drawable profileImage = typedArray.getDrawable(R.sty...
leafpicrevived
positive
436,094
@GenerateMicroBenchmark public void simpleTestGson() { gsonSer.serialize(SIMPLE_DATA); }
@GenerateMicroBenchmark public void simpleTestGson() { <DeepExtract> gsonSer.serialize(SIMPLE_DATA); </DeepExtract> }
json-parsers-benchmark
positive
436,095
private void processMark(final String[] part) { if (part.length < MARK_PARTS) { usage(MARK); return; } String name = part[1]; try { t = (Agent) control.getWorld().getPersonByName(name); } catch (AgentNotFoundException e) { try { t = (Place) control.getWorld().getPlaceByName(name); } catch (PlaceNotFoundException e1) { ...
private void processMark(final String[] part) { if (part.length < MARK_PARTS) { usage(MARK); return; } String name = part[1]; try { t = (Agent) control.getWorld().getPersonByName(name); } catch (AgentNotFoundException e) { try { t = (Place) control.getWorld().getPlaceByName(name); } catch (PlaceNotFoundException e1) { ...
Siafu
positive
436,097
@Override public ByteBuffer encode(T input) { if (minProtocolVersion > protocolVersion) { throw new ProtocolVersionException(cqlType, protocolVersion, minProtocolVersion); } if (input == null) { return null; } try { return ByteBuffer.wrap(input.getBytes(charset)); } catch (UnsupportedEncodingException uee) { throw new ...
@Override public ByteBuffer encode(T input) { if (minProtocolVersion > protocolVersion) { throw new ProtocolVersionException(cqlType, protocolVersion, minProtocolVersion); } if (input == null) { return null; } <DeepExtract> try { return ByteBuffer.wrap(input.getBytes(charset)); } catch (UnsupportedEncodingException uee...
simulacron
positive
436,098
@Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (DEBUG) { log("onConfigurationChange: Updating dimensions"); } final Resources res = getContext().getResources(); mSnapRadius = mGbResources.getDimensionPixelSize(R.dimen.pie_snap_radius) * mPieScale; ...
@Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (DEBUG) { log("onConfigurationChange: Updating dimensions"); } <DeepExtract> final Resources res = getContext().getResources(); mSnapRadius = mGbResources.getDimensionPixelSize(R.dimen.pie_snap_radius)...
GravityBox
positive
436,100
public void run() { thread = this; try { while (thread != null) { Socket socket = ss.accept(); socket.setTcpNoDelay(true); InputStream in = socket.getInputStream(); OutputStream out = socket.getOutputStream(); ChannelDirectTCPIP channel = new ChannelDirectTCPIP(); channel.init(); channel.setInputStream(in); channel.set...
public void run() { thread = this; try { while (thread != null) { Socket socket = ss.accept(); socket.setTcpNoDelay(true); InputStream in = socket.getInputStream(); OutputStream out = socket.getOutputStream(); ChannelDirectTCPIP channel = new ChannelDirectTCPIP(); channel.init(); channel.setInputStream(in); channel.set...
jsch-documentation
positive
436,101
@Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); Request.Builder requestBuilder = request.newBuilder(); Headers.Builder headerBuilder = request.headers().newBuilder(); if (headerParamsMap.size() > 0) { Iterator iterator = headerParamsMap.entrySet().iterator(); whi...
@Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); Request.Builder requestBuilder = request.newBuilder(); Headers.Builder headerBuilder = request.headers().newBuilder(); if (headerParamsMap.size() > 0) { Iterator iterator = headerParamsMap.entrySet().iterator(); whi...
RetrofitAndRxjavaforRecyclerview
positive
436,102
@Override public void onTimerAdded(String dropwizardName, Timer timer) { List<String> additionalLabelNames = new ArrayList<>(); additionalLabelNames.add(QUANTILE_LABEL_NAME); List<String> additionalBucketLabel = new ArrayList<>(); additionalBucketLabel.add(BUCKET_LABEL_NAME); final CassandraMetricDefinition proto = par...
@Override public void onTimerAdded(String dropwizardName, Timer timer) { List<String> additionalLabelNames = new ArrayList<>(); additionalLabelNames.add(QUANTILE_LABEL_NAME); List<String> additionalBucketLabel = new ArrayList<>(); additionalBucketLabel.add(BUCKET_LABEL_NAME); final CassandraMetricDefinition proto = par...
management-api-for-apache-cassandra
positive
436,103
@Override protected ClassLoader createClassLoader(String... args) throws Exception { GenericClassLoader classLoader = new GenericClassLoader(MAIN_CLASS_LOADER_NAME, getParentClassLoader(), getResourceLoaderFactory()); String classPath = ManagementFactory.getRuntimeMXBean().getClassPath(); if (!ObjectUtils.isEmpty(class...
@Override protected ClassLoader createClassLoader(String... args) throws Exception { GenericClassLoader classLoader = new GenericClassLoader(MAIN_CLASS_LOADER_NAME, getParentClassLoader(), getResourceLoaderFactory()); <DeepExtract> String classPath = ManagementFactory.getRuntimeMXBean().getClassPath(); if (!ObjectUtils...
springboot-plugin-framework-parent
positive
436,104
public void setViewportTopLeft(float left, float top) { final float width = visibleCoorport.width(); final float height = visibleCoorport.height(); left = Math.max(maxCoorport.left, Math.min(left, maxCoorport.right - width)); top = Math.max(maxCoorport.bottom + height, Math.min(top, maxCoorport.top)); if (left + width ...
public void setViewportTopLeft(float left, float top) { final float width = visibleCoorport.width(); final float height = visibleCoorport.height(); left = Math.max(maxCoorport.left, Math.min(left, maxCoorport.right - width)); top = Math.max(maxCoorport.bottom + height, Math.min(top, maxCoorport.top)); <DeepExtract> if ...
LuckyEcgDemo
positive
436,105
public void setBytes(int index, ChannelBuffer src, int length) { if (length > src.readableBytes()) { throw new IndexOutOfBoundsException("Too many bytes to write: Need " + length + ", maximum is " + src.readableBytes()); } setBytes(index, src, src.readerIndex(), length); if (src.readerIndex() + length < 0 || src.reader...
public void setBytes(int index, ChannelBuffer src, int length) { if (length > src.readableBytes()) { throw new IndexOutOfBoundsException("Too many bytes to write: Need " + length + ", maximum is " + src.readableBytes()); } setBytes(index, src, src.readerIndex(), length); <DeepExtract> if (src.readerIndex() + length < 0...
terminator
positive
436,109
@Override public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) { if (executionListener != null) { for (String event : EXECUTION_EVENTS) { activity.addListener(event, executionListener); } } }
@Override public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) { <DeepExtract> if (executionListener != null) { for (String event : EXECUTION_EVENTS) { activity.addListener(event, executionListener); } } </DeepExtract> }
camunda-bpm-spring-boot-starter
positive
436,110
public Criteria andSurgeryweekBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "surgeryweek" + " cannot be null"); } criteria.add(new Criterion("surgeryWeek between", value1, value2)); return (Criteria) this; }
public Criteria andSurgeryweekBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "surgeryweek" + " cannot be null"); } criteria.add(new Criterion("surgeryWeek between", value1, value2)); </DeepExtract> return (Criteria) this; ...
Hospital
positive
436,112
@Override public void dispose() { getChildren().remove(rootNode); List<Object> keys = new LinkedList<>(rootNode.getProperties().keySet()); keys.stream().forEach(key -> { if (key instanceof Element) { removeElement((Element) key); } }); rootNode = null; super.dispose(); }
@Override public void dispose() { getChildren().remove(rootNode); <DeepExtract> List<Object> keys = new LinkedList<>(rootNode.getProperties().keySet()); keys.stream().forEach(key -> { if (key instanceof Element) { removeElement((Element) key); } }); </DeepExtract> rootNode = null; super.dispose(); }
FXForm2
positive
436,113
@Override public void deserializeNBT(CompoundNBT nbt) { redstoneControlType = RedstoneControlType.values()[nbt.getInt("redstoneType")]; PipeUsableConfig config = new PipeUsableConfig(); config.deserializeNBT((CompoundNBT) nbt.get("filter")); return config; }
@Override public void deserializeNBT(CompoundNBT nbt) { redstoneControlType = RedstoneControlType.values()[nbt.getInt("redstoneType")]; <DeepExtract> PipeUsableConfig config = new PipeUsableConfig(); config.deserializeNBT((CompoundNBT) nbt.get("filter")); return config; </DeepExtract> }
Techarium
positive
436,114
public final void flagAndUpdate(@Nullable GuiElementImpl<?> element) { if (element != null) { flaggedForUpdate.add(element); } anythingFlagged = true; cachedOpenPacket = null; if (atomicUpdateLock != 0 || !anythingFlagged) { return; } plugin.log(Level.OFF, "Root > updating {0}", id); if (!viewers.isEmpty()) { flaggedFo...
public final void flagAndUpdate(@Nullable GuiElementImpl<?> element) { if (element != null) { flaggedForUpdate.add(element); } anythingFlagged = true; cachedOpenPacket = null; <DeepExtract> if (atomicUpdateLock != 0 || !anythingFlagged) { return; } plugin.log(Level.OFF, "Root > updating {0}", id); if (!viewers.isEmpty(...
Iodine
positive
436,115
@Override protected void onDestroy() { super.onDestroy(); Drawable drawable = mView.getDrawable(); if (drawable != null && drawable instanceof BitmapDrawable) { ((ImageView) findViewById(R.id.iv_show)).setImageDrawable(null); ((BitmapDrawable) drawable).getBitmap().recycle(); } }
@Override protected void onDestroy() { super.onDestroy(); <DeepExtract> Drawable drawable = mView.getDrawable(); if (drawable != null && drawable instanceof BitmapDrawable) { ((ImageView) findViewById(R.id.iv_show)).setImageDrawable(null); ((BitmapDrawable) drawable).getBitmap().recycle(); } </DeepExtract> }
Genius-Android
positive
436,116
public int countRangeSum(int[] nums, int lower, int upper) { int n = nums.length; long[] sums = new long[n + 1]; for (int i = 0; i < n; i++) { sums[i + 1] = sums[i] + nums[i]; } if (n + 1 - 0 <= 1) return 0; int mid = (0 + n + 1) / 2; int count = countWhileMergeSort(sums, 0, mid, lower, upper) + countWhileMergeSort(sum...
public int countRangeSum(int[] nums, int lower, int upper) { int n = nums.length; long[] sums = new long[n + 1]; for (int i = 0; i < n; i++) { sums[i + 1] = sums[i] + nums[i]; } <DeepExtract> if (n + 1 - 0 <= 1) return 0; int mid = (0 + n + 1) / 2; int count = countWhileMergeSort(sums, 0, mid, lower, upper) + countWhil...
coding
positive
436,117
public Builder clearCapabilities() { bitField0_ = (bitField0_ & ~0x00000004); java.lang.Object ref = capabilities_; if (ref instanceof java.lang.String) { capabilities_ = (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if...
public Builder clearCapabilities() { bitField0_ = (bitField0_ & ~0x00000004); <DeepExtract> java.lang.Object ref = capabilities_; if (ref instanceof java.lang.String) { capabilities_ = (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toSt...
protobuf-ble-rpc
positive
436,118
public Criteria andSyncDelayIn(List<Integer> values) { if (values == null) { throw new RuntimeException("Value for " + "syncDelay" + " cannot be null"); } criteria.add(new Criterion("sync_delay in", values)); return (Criteria) this; }
public Criteria andSyncDelayIn(List<Integer> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "syncDelay" + " cannot be null"); } criteria.add(new Criterion("sync_delay in", values)); </DeepExtract> return (Criteria) this; }
AnyMock
positive
436,119
@Test(expected = ConnectException.class) public void valueSchemaMustBePresentForPkModeRecordValue() { return extract(JdbcSinkConfig.PrimaryKeyMode.RECORD_VALUE, Collections.emptyList(), Collections.<String>emptySet(), SIMPLE_PRIMITIVE_SCHEMA, null); }
@Test(expected = ConnectException.class) public void valueSchemaMustBePresentForPkModeRecordValue() { <DeepExtract> return extract(JdbcSinkConfig.PrimaryKeyMode.RECORD_VALUE, Collections.emptyList(), Collections.<String>emptySet(), SIMPLE_PRIMITIVE_SCHEMA, null); </DeepExtract> }
aiven-kafka-connect-jdbc
positive
436,120
private static Path ensureFileHasSuffix(final Path file, final String suffix) { String filename; Path fileName = file.getFileName(); if (fileName == null) { throw new SantaException("Empty file path"); } else { filename = fileName.toString(); } if (!filename.contains(".")) { String newFilename = filename + suffix; Path...
private static Path ensureFileHasSuffix(final Path file, final String suffix) { <DeepExtract> String filename; Path fileName = file.getFileName(); if (fileName == null) { throw new SantaException("Empty file path"); } else { filename = fileName.toString(); } </DeepExtract> if (!filename.contains(".")) { String newFilen...
Santulator
positive
436,121
public static String getUuid(Context c) { String aID = getAndroidId(c); String wifiMac = getWifiMacAddress(c); String devid = getDeviceId(c); String concat = ""; if (aID != null) concat = aID; else concat = "0000000000000000"; if (wifiMac != null) concat += wifiMac; else concat += "00:00:00:00:00:00"; if (devid != null...
public static String getUuid(Context c) { <DeepExtract> String aID = getAndroidId(c); String wifiMac = getWifiMacAddress(c); String devid = getDeviceId(c); String concat = ""; if (aID != null) concat = aID; else concat = "0000000000000000"; if (wifiMac != null) concat += wifiMac; else concat += "00:00:00:00:00:00"; if ...
carat-android
positive
436,122
static <K> Spliterator<K> keySpliteratorFor(NavigableMap<K, ?> m) { if (m instanceof TreeMapBST) { @SuppressWarnings("unchecked") TreeMapBST<K, Object> t = (TreeMapBST<K, Object>) m; return t.keySpliterator(); } if (m instanceof DescendingSubMap) { @SuppressWarnings("unchecked") DescendingSubMap<K, ?> dm = (DescendingS...
static <K> Spliterator<K> keySpliteratorFor(NavigableMap<K, ?> m) { if (m instanceof TreeMapBST) { @SuppressWarnings("unchecked") TreeMapBST<K, Object> t = (TreeMapBST<K, Object>) m; return t.keySpliterator(); } if (m instanceof DescendingSubMap) { @SuppressWarnings("unchecked") DescendingSubMap<K, ?> dm = (DescendingS...
bbst-showdown
positive
436,123
@Override public void run() { while (!bufferInitialized) { synchronized (bufferInitializedMonitor) { try { bufferInitializedMonitor.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } } } try { line = AudioSystem.getSourceDataLine(FORMAT); line.open(FORMAT, BUFFER_SIZE); } catch (LineUnavailable...
@Override public void run() { while (!bufferInitialized) { synchronized (bufferInitializedMonitor) { try { bufferInitializedMonitor.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } } } try { line = AudioSystem.getSourceDataLine(FORMAT); line.open(FORMAT, BUFFER_SIZE); } catch (LineUnavailable...
coffee-gb
positive
436,124
public static LocalDateTime getDSTStart() { int year = YearMonth.now().getYear(); int month = DateTimeConstants.MARCH; int dayOfWeek = DateTimeConstants.SUNDAY; return new LocalDateTime(year, month, 1, 0, 0, 0).dayOfWeek().setCopy(dayOfWeek).plusWeeks(1); }
public static LocalDateTime getDSTStart() { int year = YearMonth.now().getYear(); int month = DateTimeConstants.MARCH; int dayOfWeek = DateTimeConstants.SUNDAY; <DeepExtract> return new LocalDateTime(year, month, 1, 0, 0, 0).dayOfWeek().setCopy(dayOfWeek).plusWeeks(1); </DeepExtract> }
charging_pile_cloud
positive
436,126
private void setDungeonsFromString(String s) { this.dungeons.clear(); for (String a : s.split(";")) { AdventureSetting adventureSetting = AdventureSetting.fromString(a); if (adventureSetting != null) { this.dungeons.add(adventureSetting); } else { warningSettingLInes.add("Unknown " + "dungeon" + " setting format: " + a...
private void setDungeonsFromString(String s) { <DeepExtract> this.dungeons.clear(); for (String a : s.split(";")) { AdventureSetting adventureSetting = AdventureSetting.fromString(a); if (adventureSetting != null) { this.dungeons.add(adventureSetting); } else { warningSettingLInes.add("Unknown " + "dungeon" + " setting...
BHBot
positive
436,127
private void startActivityError(PurchaseType type) throws InterruptedException, RemoteException { int requestCode = 1001; int itemIndex = 0; String itemId = String.format(Locale.ENGLISH, "%s_%d", DataConverter.TEST_PRODUCT_ID, itemIndex); PendingIntent pendingIntent = PendingIntent.getActivity(mContext.getContext(), 1,...
private void startActivityError(PurchaseType type) throws InterruptedException, RemoteException { int requestCode = 1001; int itemIndex = 0; String itemId = String.format(Locale.ENGLISH, "%s_%d", DataConverter.TEST_PRODUCT_ID, itemIndex); <DeepExtract> PendingIntent pendingIntent = PendingIntent.getActivity(mContext.ge...
android-easy-checkout
positive
436,128
@Override public void setSelectionBarMonthTextColor(int selectionBarMonthTextColor) { settingsManager.setSelectionBarMonthTextColor(selectionBarMonthTextColor); if (monthAdapter != null) { monthAdapter.notifyDataSetChanged(); rvMonths.scrollToPosition(lastVisibleMonthPosition); multipleSelectionBarAdapter.notifyDataSet...
@Override public void setSelectionBarMonthTextColor(int selectionBarMonthTextColor) { settingsManager.setSelectionBarMonthTextColor(selectionBarMonthTextColor); <DeepExtract> if (monthAdapter != null) { monthAdapter.notifyDataSetChanged(); rvMonths.scrollToPosition(lastVisibleMonthPosition); multipleSelectionBarAdapter...
CosmoCalendar
positive
436,130
@Override public void visitLookAround(LookAroundTree tree) { RegexTree element = tree.getElement(); if (element != null) { visit(element); } }
@Override public void visitLookAround(LookAroundTree tree) { <DeepExtract> RegexTree element = tree.getElement(); if (element != null) { visit(element); } </DeepExtract> }
sonar-analyzer-commons
positive
436,132
@Override public WeightedSet<DAGNode> execute(Object... args) throws IllegalArgumentException, ModuleException { if (args.length < 1 || !(args[0] instanceof DAGNode)) return null; DAGNode basePred = (DAGNode) args[0]; Node[] nodes = new Node[args.length - 1]; for (int i = 1; i < args.length; i++) { if (!(args[i] instan...
@Override public WeightedSet<DAGNode> execute(Object... args) throws IllegalArgumentException, ModuleException { if (args.length < 1 || !(args[0] instanceof DAGNode)) return null; DAGNode basePred = (DAGNode) args[0]; Node[] nodes = new Node[args.length - 1]; for (int i = 1; i < args.length; i++) { if (!(args[i] instan...
CycDAG
positive
436,133
public TreeNode buildTree2(int[] inorder, int[] postorder) { if (inorder == null || postorder == null || inorder.length != postorder.length) return null; HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>(); for (int i = 0; i < inorder.length; ++i) hm.put(inorder[i], i); if (0 > postorder.length - 1 || 0 > in...
public TreeNode buildTree2(int[] inorder, int[] postorder) { if (inorder == null || postorder == null || inorder.length != postorder.length) return null; HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>(); for (int i = 0; i < inorder.length; ++i) hm.put(inorder[i], i); <DeepExtract> if (0 > postorder.length...
myleetcode
positive
436,134
@Test public void testEventResponse_requiredShareCountChanged_setToTwoWhileTotalShareCountIsEmpty() { presenter.startPresenting().blockingGet(); totalShareCountObservable.onNext(Optional.empty()); requiredShareCountObservable.onNext(Optional.of(2)); verify(mockView, never()).showPersistentError(FEWER_THAN_TWO_REQUIRED_...
@Test public void testEventResponse_requiredShareCountChanged_setToTwoWhileTotalShareCountIsEmpty() { presenter.startPresenting().blockingGet(); totalShareCountObservable.onNext(Optional.empty()); requiredShareCountObservable.onNext(Optional.of(2)); verify(mockView, never()).showPersistentError(FEWER_THAN_TWO_REQUIRED_...
Shamir
positive
436,135
@Test public void testWorkflowNS() throws Exception { JobLauncher launcher = ctx.getBean(JobLauncher.class); Map<String, Job> jobs = ctx.getBeansOfType(Job.class); for (Map.Entry<String, Job> entry : jobs.entrySet()) { System.out.println("Executing job " + entry.getKey()); try { if (launcher.run(entry.getValue(), new J...
@Test public void testWorkflowNS() throws Exception { <DeepExtract> JobLauncher launcher = ctx.getBean(JobLauncher.class); Map<String, Job> jobs = ctx.getBeansOfType(Job.class); for (Map.Entry<String, Job> entry : jobs.entrySet()) { System.out.println("Executing job " + entry.getKey()); try { if (launcher.run(entry.get...
spring-data-book
positive
436,136
@Override public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) { Log.e(TAG, "onNestedScroll: " + dyUnconsumed); totalDrag -= dyUnconsumed; Log.i(TAG, "updateOffset: " + totalDrag); header.setTranslationY(totalDrag > 0 ? 0 : totalDrag); if (totalDrag > 0) { totalDra...
@Override public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) { Log.e(TAG, "onNestedScroll: " + dyUnconsumed); <DeepExtract> totalDrag -= dyUnconsumed; Log.i(TAG, "updateOffset: " + totalDrag); header.setTranslationY(totalDrag > 0 ? 0 : totalDrag); if (totalDrag >...
MyBlogDemo
positive
436,137
@Override public void exitExprMod(PuffinBasicParser.ExprModContext ctx) { var exprL = lookupInstruction(ctx.expr(0)); var exprR = lookupInstruction(ctx.expr(1)); var dt1 = ir.getSymbolTable().get(exprL.result).getType().getAtomTypeId(); var dt2 = ir.getSymbolTable().get(exprR.result).getType().getAtomTypeId(); Types.as...
@Override public void exitExprMod(PuffinBasicParser.ExprModContext ctx) { <DeepExtract> var exprL = lookupInstruction(ctx.expr(0)); var exprR = lookupInstruction(ctx.expr(1)); var dt1 = ir.getSymbolTable().get(exprL.result).getType().getAtomTypeId(); var dt2 = ir.getSymbolTable().get(exprR.result).getType().getAtomType...
PuffinBASIC
positive
436,139
@Test public void callableShouldBeRemotable() throws IOException { @SuppressWarnings("unchecked") SVNLogFilter filter = new DefaultSVNLogFilter(new Pattern[] { compile("excludes") }, new Pattern[] { compile("includes") }, Collections.EMPTY_SET, "", new Pattern[0], false); StreamTaskListener taskListener = null; this.ca...
@Test public void callableShouldBeRemotable() throws IOException { <DeepExtract> @SuppressWarnings("unchecked") SVNLogFilter filter = new DefaultSVNLogFilter(new Pattern[] { compile("excludes") }, new Pattern[] { compile("includes") }, Collections.EMPTY_SET, "", new Pattern[0], false); StreamTaskListener taskListener =...
subversion-plugin
positive
436,141
@Override public void run(Counter sut) { n = n + 1; }
@Override public void run(Counter sut) { <DeepExtract> n = n + 1; </DeepExtract> }
QuickTheories
positive
436,143
public static boolean breakBlockSimple(BlockPos pos) { EnumFacing side = null; EnumFacing[] sides = EnumFacing.values(); Vec3d eyesPos = Utils.getEyesPos(); Vec3d relCenter = getState(pos).getBoundingBox(Wrapper.INSTANCE.world(), pos).getCenter(); Vec3d center = new Vec3d(pos).add(relCenter); Vec3d[] hitVecs = new Vec3...
public static boolean breakBlockSimple(BlockPos pos) { EnumFacing side = null; EnumFacing[] sides = EnumFacing.values(); Vec3d eyesPos = Utils.getEyesPos(); Vec3d relCenter = getState(pos).getBoundingBox(Wrapper.INSTANCE.world(), pos).getCenter(); Vec3d center = new Vec3d(pos).add(relCenter); Vec3d[] hitVecs = new Vec3...
Gish-Code-1.12.2
positive
436,145
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); float centerX = (getWidth()) / 2; RectF rectF = new RectF(0 + borderWidth, borderWidth, 2 * centerX - borderWidth, 2 * centerX - borderWidth); Paint paint = new Paint(); paint.setColor(getResources().getColor(R.color.yellow)); paint.setStrokeJoin(Pa...
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); float centerX = (getWidth()) / 2; RectF rectF = new RectF(0 + borderWidth, borderWidth, 2 * centerX - borderWidth, 2 * centerX - borderWidth); Paint paint = new Paint(); paint.setColor(getResources().getColor(R.color.yellow)); paint.setStrokeJoin(Pa...
jkapp
positive
436,148
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(); intentExtras = new Bundle(); mConvertCursorToListString = new ConvertCursorToListString(this); mStringProcessing = new StringProcessing(); mDatabaseAdapter = new DatabaseAdapter(this); Bundle intentExtra...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(); intentExtras = new Bundle(); mConvertCursorToListString = new ConvertCursorToListString(this); mStringProcessing = new StringProcessing(); mDatabaseAdapter = new DatabaseAdapter(this); Bundle intentExtra...
expense-tracker
positive
436,149
public void snap() throws ConfigurationException, IllegalArgumentException, IOException { for (final VisitState visitState : distributor.schemeAuthority2VisitState.visitStates()) if (visitState != null) visitState.removeRobots(); LOGGER.info("Final statistics"); distributor.statsThread.emit(); distributor.statsThread.r...
public void snap() throws ConfigurationException, IllegalArgumentException, IOException { for (final VisitState visitState : distributor.schemeAuthority2VisitState.visitStates()) if (visitState != null) visitState.removeRobots(); LOGGER.info("Final statistics"); distributor.statsThread.emit(); distributor.statsThread.r...
BUbiNG
positive
436,153
public void OnSSLError(SException Erro) throws Exception { Config.GlobalLog(Config.GLOG_Server, Nick, Tag + ": SSLError: " + Erro.getMessage()); if (SSLEIDSendUserMessage == false) return; HashMap<String, String> Hldr0 = SrvSMTPSession.ClassicHeaders("server@" + Onion, MailFrom2); Hldr0.put("subject", "Delivery SSL sta...
public void OnSSLError(SException Erro) throws Exception { <DeepExtract> Config.GlobalLog(Config.GLOG_Server, Nick, Tag + ": SSLError: " + Erro.getMessage()); </DeepExtract> if (SSLEIDSendUserMessage == false) return; HashMap<String, String> Hldr0 = SrvSMTPSession.ClassicHeaders("server@" + Onion, MailFrom2); Hldr0.put...
onionmail
positive
436,154
@Override public void onClick(DialogInterface dialogInterface, int i) { Intent intent = new Intent(context, MainMenuActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); context.startActivity(intent); }
@Override public void onClick(DialogInterface dialogInterface, int i) { <DeepExtract> Intent intent = new Intent(context, MainMenuActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); context.startActivity(intent); </DeepExtract> }
Endoscope
positive
436,155
public void addNote(Note note) { notes.add(note); scoreContent.add(note.toString()); }
public void addNote(Note note) { notes.add(note); <DeepExtract> scoreContent.add(note.toString()); </DeepExtract> }
jmn
positive
436,156
public void writeSetBegin(TSet set) throws TException { if (set.size <= 14) { writeByteDirect(set.size << 4 | getCompactType(set.elemType)); } else { writeByteDirect(0xf0 | getCompactType(set.elemType)); writeVarint32(set.size); } }
public void writeSetBegin(TSet set) throws TException { <DeepExtract> if (set.size <= 14) { writeByteDirect(set.size << 4 | getCompactType(set.elemType)); } else { writeByteDirect(0xf0 | getCompactType(set.elemType)); writeVarint32(set.size); } </DeepExtract> }
Thrift-Client-Server-Example--PHP-
positive
436,157
public static int getMaxCpForTrainerLevel(int attack, int defense, int stamina, int trainerLevel) { float maxPokemonLevel = Math.min(40.5f, trainerLevel + 1.5F); float pokemonLevel = Math.min(40.5f, maxPokemonLevel); float cpMultiplier = LEVEL_CPMULTIPLIER.get(pokemonLevel); return (int) Math.round((double) attack * Ma...
public static int getMaxCpForTrainerLevel(int attack, int defense, int stamina, int trainerLevel) { float maxPokemonLevel = Math.min(40.5f, trainerLevel + 1.5F); <DeepExtract> float pokemonLevel = Math.min(40.5f, maxPokemonLevel); float cpMultiplier = LEVEL_CPMULTIPLIER.get(pokemonLevel); return (int) Math.round((doubl...
BlossomsPokemonGoManager
positive
436,158
@Override public void run() { if (client == null) return; try { client.close(); } catch (IOException exception) { } }
@Override public void run() { <DeepExtract> if (client == null) return; try { client.close(); } catch (IOException exception) { } </DeepExtract> }
watchdog
positive
436,159
public int delete(Serializable entity) { BoundSql boundSql = Criteria.delete(entity.getClass()).mappingHandler(getMappingHandler()).build(entity, true); BoundSql boundSql = Criteria.update(boundSql.getSql().getClass()).mappingHandler(getMappingHandler()).build(boundSql.getSql(), boundSql.getParameters().toArray()); ret...
public int delete(Serializable entity) { BoundSql boundSql = Criteria.delete(entity.getClass()).mappingHandler(getMappingHandler()).build(entity, true); <DeepExtract> BoundSql boundSql = Criteria.update(boundSql.getSql().getClass()).mappingHandler(getMappingHandler()).build(boundSql.getSql(), boundSql.getParameters().t...
dexcoder-assistant
positive
436,160
@Override public byte[] delete(K key) throws IOException { deleteCounter.incrementAndGet(); readWriteLock.writeLock(Math.abs(key.hashCode())); try { CacheValueWrapper wrapper = pointerMap.get(key); if (wrapper != null) { byte[] payload = storageManager.remove(wrapper.getPointer()); pointerMap.remove(key); usedSize.addA...
@Override public byte[] delete(K key) throws IOException { deleteCounter.incrementAndGet(); <DeepExtract> readWriteLock.writeLock(Math.abs(key.hashCode())); </DeepExtract> try { CacheValueWrapper wrapper = pointerMap.get(key); if (wrapper != null) { byte[] payload = storageManager.remove(wrapper.getPointer()); pointerM...
okcache
positive
436,161
private void registerUserChangeReceiver() { var userFilter = new IntentFilter(); userFilter.addAction(ACTION_USER_ADDED); userFilter.addAction(ACTION_USER_REMOVED); registerReceiver(List.of(userFilter), null, -1, this::dispatchUserChanged, Context.RECEIVER_NOT_EXPORTED); Log.d(TAG, "registered user info change receiver...
private void registerUserChangeReceiver() { var userFilter = new IntentFilter(); userFilter.addAction(ACTION_USER_ADDED); userFilter.addAction(ACTION_USER_REMOVED); <DeepExtract> registerReceiver(List.of(userFilter), null, -1, this::dispatchUserChanged, Context.RECEIVER_NOT_EXPORTED); </DeepExtract> Log.d(TAG, "registe...
LSPosed
positive
436,162
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_line_chart); this.linechart = (LineChart) findViewById(R.id.linechart); List<LineEntity<DateValueEntity>> lines = new ArrayList<LineEntity<DateValueEntity>>(); LineEntity<DateValueEntity> MA5...
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_line_chart); <DeepExtract> this.linechart = (LineChart) findViewById(R.id.linechart); List<LineEntity<DateValueEntity>> lines = new ArrayList<LineEntity<DateValueEntity>>(); LineEntity<DateVa...
Android-Charts
positive
436,164
public void windowClosing(java.awt.event.WindowEvent e) { closeWindows(); System.exit(0); }
public void windowClosing(java.awt.event.WindowEvent e) { <DeepExtract> closeWindows(); System.exit(0); </DeepExtract> }
gomule
positive
436,165
@Test public void testLoadFromConfigIgnoresConfigFileWhenNull() throws IOException { Field configFile; try { Field f = CLISettings.class.getDeclaredField("CONFIG_FILE"); configFile = f; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } Object configFileOrg; try { configFile.setAccessible(true); c...
@Test public void testLoadFromConfigIgnoresConfigFileWhenNull() throws IOException { Field configFile; try { Field f = CLISettings.class.getDeclaredField("CONFIG_FILE"); configFile = f; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } Object configFileOrg; try { configFile.setAccessible(true); c...
sherlock
positive
436,166
@Override public void startNestedAnim(int startX, int startY, int destX, int destY) { mHeaderView.stopNestedAnim(); mFooterView.stopNestedAnim(); return super.stopNestedAnim(); super.startNestedAnim(startX, startY, destX, destY); }
@Override public void startNestedAnim(int startX, int startY, int destX, int destY) { <DeepExtract> mHeaderView.stopNestedAnim(); mFooterView.stopNestedAnim(); return super.stopNestedAnim(); </DeepExtract> super.startNestedAnim(startX, startY, destX, destY); }
PullLayout
positive
436,167
private void surfaceChanged(int width, int height) { Log.d(TAG, "surfaceChanged " + width + "x" + height); GlUtil.checkGlError("prepareFramebuffer start"); int[] values = new int[1]; GLES20.glGenTextures(1, values, 0); GlUtil.checkGlError("glGenTextures"); mOffscreenTexture = values[0]; GLES20.glBindTexture(GLES20.GL_T...
private void surfaceChanged(int width, int height) { Log.d(TAG, "surfaceChanged " + width + "x" + height); <DeepExtract> GlUtil.checkGlError("prepareFramebuffer start"); int[] values = new int[1]; GLES20.glGenTextures(1, values, 0); GlUtil.checkGlError("glGenTextures"); mOffscreenTexture = values[0]; GLES20.glBindTextu...
ZeroToOpenGL
positive
436,168
@Test public void testRunProducing1NewFileCoveredByLinking() throws SvnClientException, URISyntaxException, InterruptedException, CmdUtilException, IOException, SQLException { svnRepositoryInfo = TempSvnRepositoryFactory.createAndFillTempSvnRepository(); final DBContainerObject containerObject = TempH2DatabaseFactory.c...
@Test public void testRunProducing1NewFileCoveredByLinking() throws SvnClientException, URISyntaxException, InterruptedException, CmdUtilException, IOException, SQLException { <DeepExtract> svnRepositoryInfo = TempSvnRepositoryFactory.createAndFillTempSvnRepository(); final DBContainerObject containerObject = TempH2Dat...
MergeProcessor
positive
436,169
@Override public void onTapShiftSwitchReceived(@NonNull String tapAddress, int data) { tapListeners.notifyAll(listener -> listener.onTapShiftSwitchReceived(tapAddress, data)); }
@Override public void onTapShiftSwitchReceived(@NonNull String tapAddress, int data) { <DeepExtract> tapListeners.notifyAll(listener -> listener.onTapShiftSwitchReceived(tapAddress, data)); </DeepExtract> }
tap-android-sdk
positive
436,172
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Map<String, String> containerMap = new HashMap<String, String>(); containerMap.put("count", "10"); try { APIContext apiContext = new APIContext(clientID, clientSecret, mode); PaymentHistory paymentHis...
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { <DeepExtract> Map<String, String> containerMap = new HashMap<String, String>(); containerMap.put("count", "10"); try { APIContext apiContext = new APIContext(clientID, clientSecret, mode); PaymentHist...
PayPal-Java-SDK
positive
436,173
@Override public void onPrepareOptionsMenu(Menu menu) { Log.d(); if (mAdapter == null) { return; } boolean enabled = (mAdapter != null) && (mAdapter.getCount() > 0); Log.d("(enabled=" + enabled + ")"); if (mMenu != null) { MenuItem item = mMenu.findItem(R.id.menu_clear); if (item != null) { item.setEnabled(enabled); } ...
@Override public void onPrepareOptionsMenu(Menu menu) { Log.d(); if (mAdapter == null) { return; } <DeepExtract> boolean enabled = (mAdapter != null) && (mAdapter.getCount() > 0); Log.d("(enabled=" + enabled + ")"); if (mMenu != null) { MenuItem item = mMenu.findItem(R.id.menu_clear); if (item != null) { item.setEnable...
Viz
positive
436,176
public TiledMapEntity createTiledMapEntity(int order, int assetId, AssetMgr assets) { TiledMapEntity result = new TiledMapEntity(getNewId(), assetId, assets); result.setOrder(order); if (entities.containsKey(result.getId())) { throw new IllegalArgumentException("Exception while adding Entity: " + result + " (ID already...
public TiledMapEntity createTiledMapEntity(int order, int assetId, AssetMgr assets) { TiledMapEntity result = new TiledMapEntity(getNewId(), assetId, assets); result.setOrder(order); <DeepExtract> if (entities.containsKey(result.getId())) { throw new IllegalArgumentException("Exception while adding Entity: " + result +...
rgb4
positive
436,177
public boolean sameIdentityAs(final T that) { if (!(that instanceof EntityBase)) { return false; } final EntityBase<?> that = (EntityBase<?>) that; _checkIdentity(this); _checkIdentity(that); return this.id.equals(that.getId()); }
public boolean sameIdentityAs(final T that) { <DeepExtract> if (!(that instanceof EntityBase)) { return false; } final EntityBase<?> that = (EntityBase<?>) that; _checkIdentity(this); _checkIdentity(that); return this.id.equals(that.getId()); </DeepExtract> }
ms-spring-ddd-examples
positive
436,178
@Override public int compare(byte[] a, byte[] b) { return BytewiseComparatorImpl.getInstance().Compare(new Slice(a), new Slice(b)); }
@Override public int compare(byte[] a, byte[] b) { <DeepExtract> return BytewiseComparatorImpl.getInstance().Compare(new Slice(a), new Slice(b)); </DeepExtract> }
leveldb-java
positive
436,179
@Test public void exclusive() { left = list(a, b, e, j); right = list(a, c, f, m); leftRight = arr(d, h, i, g, n, o); rightLeft = arr(g, o, n, d, i, h); skip = arr(d, g); int cnt = 0; for (Match match : new BoundedMatchIterator(o, empty, empty, true, false)) { assertTrue(match == o); ++cnt; } assertEquals((false ? 1 : ...
@Test public void exclusive() { left = list(a, b, e, j); right = list(a, c, f, m); leftRight = arr(d, h, i, g, n, o); rightLeft = arr(g, o, n, d, i, h); skip = arr(d, g); <DeepExtract> int cnt = 0; for (Match match : new BoundedMatchIterator(o, empty, empty, true, false)) { assertTrue(match == o); ++cnt; } assertEquals...
caxap
positive
436,181
public void higlightItem(Item item) { assert item instanceof LeitnerItem; this.hightlightItem = (LeitnerItem) item; dataset.clear(); reconfigureColorEncoding(); ResourceBundle rb = Utils.getRB(); for (int i = 0; i < myLeitnerSystem.numBoxes(); i++) { java.util.List<LeitnerItem> flashCards = myLeitnerSystem.getBoxes().g...
public void higlightItem(Item item) { assert item instanceof LeitnerItem; this.hightlightItem = (LeitnerItem) item; <DeepExtract> dataset.clear(); reconfigureColorEncoding(); ResourceBundle rb = Utils.getRB(); for (int i = 0; i < myLeitnerSystem.numBoxes(); i++) { java.util.List<LeitnerItem> flashCards = myLeitnerSyste...
opencards
positive
436,182
public HierarchyGraph generate(final List<Relation> relations) { for (Relation relation : relations) { HierarchyGraph.newInstance().addRelation(relation); } return HierarchyGraph.newInstance(); }
public HierarchyGraph generate(final List<Relation> relations) { <DeepExtract> for (Relation relation : relations) { HierarchyGraph.newInstance().addRelation(relation); } return HierarchyGraph.newInstance(); </DeepExtract> }
random-jpa
positive
436,183
static void saveGenresBlacklist(String value) { File blacklistFile = new File(App.getInstance().getFilesDir(), GENRES_BLACKLIST_FILE); try { FileWriter writer = new FileWriter(blacklistFile); writer.append(value); writer.flush(); writer.close(); } catch (IOException e) { e.printStackTrace(); } }
static void saveGenresBlacklist(String value) { File blacklistFile = new File(App.getInstance().getFilesDir(), GENRES_BLACKLIST_FILE); <DeepExtract> try { FileWriter writer = new FileWriter(blacklistFile); writer.append(value); writer.flush(); writer.close(); } catch (IOException e) { e.printStackTrace(); } </DeepExtra...
FlibustaBookLoader
positive
436,184
@Override public void onClick(View v) { PanelCallback callback = mCallback; if (callback == null) return; KeyEvent event = new KeyEvent(0, 0, 0, KeyEvent.KEYCODE_DEL, 0, 0, 0, 0, KeyEvent.KEYCODE_ENDCALL); callback.getInputEditText().dispatchKeyEvent(event); }
@Override public void onClick(View v) { <DeepExtract> PanelCallback callback = mCallback; if (callback == null) return; KeyEvent event = new KeyEvent(0, 0, 0, KeyEvent.KEYCODE_DEL, 0, 0, 0, 0, KeyEvent.KEYCODE_ENDCALL); callback.getInputEditText().dispatchKeyEvent(event); </DeepExtract> }
CNIm4Android
positive
436,185
@Override public void createComponents(Entity root, Entity entity, MainItemVO vo) { createCommonComponents(entity, vo, EntityFactory.COLOR_PRIMITIVE); createParentNodeComponent(root, entity); createNodeComponent(root, entity); TextureRegionComponent component = new TextureRegionComponent(); Pixmap pixmap = new Pixmap(1...
@Override public void createComponents(Entity root, Entity entity, MainItemVO vo) { createCommonComponents(entity, vo, EntityFactory.COLOR_PRIMITIVE); createParentNodeComponent(root, entity); createNodeComponent(root, entity); <DeepExtract> TextureRegionComponent component = new TextureRegionComponent(); Pixmap pixmap ...
overlap2d-runtime-libgdx
positive
436,186
@Before public void before() throws Exception { DaoManager.clearCache(); if (connectionSource != null) { return; } System.setProperty("derby.stream.error.file", "target/derby.log"); if (connectionSource == null) { isConnectionExpected = isConnectionExpected(); if (isConnectionExpected) { connectionSource = new JdbcConn...
@Before public void before() throws Exception { DaoManager.clearCache(); if (connectionSource != null) { return; } System.setProperty("derby.stream.error.file", "target/derby.log"); <DeepExtract> if (connectionSource == null) { isConnectionExpected = isConnectionExpected(); if (isConnectionExpected) { connectionSource ...
ormlite-jdbc
positive
436,189
public static void main(String[] args) { ArrayList<Integer> someInts = new ArrayList<Integer>(); int[] nums = { 5, 7, 2, 15 }; for (int i = 0; i < nums.length; i++) someInts.add(nums[i]); printList(someInts); int sum = 0; for (int i = 0; i < someInts.size(); i++) sum += someInts.get(i); System.out.println("sum is " + s...
public static void main(String[] args) { <DeepExtract> ArrayList<Integer> someInts = new ArrayList<Integer>(); int[] nums = { 5, 7, 2, 15 }; for (int i = 0; i < nums.length; i++) someInts.add(nums[i]); printList(someInts); int sum = 0; for (int i = 0; i < someInts.size(); i++) sum += someInts.get(i); System.out.println...
Data-Structures
positive
436,190
public void testHasReceivedResultSinceDate() throws InterruptedException { assertFalse(server.hasReceivedResultSince(System.currentTimeMillis())); long time = System.currentTimeMillis(); Thread.sleep(100); server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("browser2.exe", 1))); HttpServletRequest re...
public void testHasReceivedResultSinceDate() throws InterruptedException { assertFalse(server.hasReceivedResultSince(System.currentTimeMillis())); long time = System.currentTimeMillis(); Thread.sleep(100); <DeepExtract> server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("browser2.exe", 1))); HttpSer...
Testing-and-Debugging-JavaScript
positive
436,191
public static void $303(SelectionKey key, String newUrl) { String message = "Resource moved to <a href='" + newUrl + "'>" + newUrl + "</a>"; ByteBuffer bb = bb("<html><head><title>Resource Moved</title></head><body><div>" + message + "</div><div><a href='/'>Back to home</a></div></body></html>"); Rfc822HeaderState rfc8...
public static void $303(SelectionKey key, String newUrl) { <DeepExtract> String message = "Resource moved to <a href='" + newUrl + "'>" + newUrl + "</a>"; ByteBuffer bb = bb("<html><head><title>Resource Moved</title></head><body><div>" + message + "</div><div><a href='/'>Back to home</a></div></body></html>"); Rfc822He...
RelaxFactory
positive
436,192
@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Log.e(TermDebug.LOG_TAG, "onCreate"); mPrefs = PreferenceManager.getDefaultSharedPreferences(this); mSettings = new TermSettings(getResources(), mPrefs); mPrivateAlias = new ComponentName(this, RemoteInterface.PRIVACT_ACTIVITY_ALIAS); Intent broadc...
@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Log.e(TermDebug.LOG_TAG, "onCreate"); mPrefs = PreferenceManager.getDefaultSharedPreferences(this); mSettings = new TermSettings(getResources(), mPrefs); mPrivateAlias = new ComponentName(this, RemoteInterface.PRIVACT_ACTIVITY_ALIAS); Intent broadc...
TerminalEmulator-Android
positive
436,193
@Override public List<String> getWriteDatasetIds() { List<String> writeDatasetIds = attributesNameCache.get(serviceName); if (writeDatasetIds != null) { return writeDatasetIds; } List<String> writeDatasetIds = new ArrayList<String>(); if (sqlMapper instanceof SqlMapClientImpl) { for (String request : getRequestsNameFor...
@Override public List<String> getWriteDatasetIds() { List<String> writeDatasetIds = attributesNameCache.get(serviceName); if (writeDatasetIds != null) { return writeDatasetIds; } <DeepExtract> List<String> writeDatasetIds = new ArrayList<String>(); if (sqlMapper instanceof SqlMapClientImpl) { for (String request : getR...
lsc
positive
436,194
@BeforeEach void clear() { eventBusSpy = new EventBusSpy(); usersService = new UsersService(userRepositoryStub, groupRepositoryStub, entityRepositoryStub, perimeterRepositoryStub, new NotificationService(userRepositoryStub, eventBusSpy)); perimeter1 = PerimeterData.builder().id("perimeter1").process("process1").stateRi...
@BeforeEach void clear() { eventBusSpy = new EventBusSpy(); usersService = new UsersService(userRepositoryStub, groupRepositoryStub, entityRepositoryStub, perimeterRepositoryStub, new NotificationService(userRepositoryStub, eventBusSpy)); perimeter1 = PerimeterData.builder().id("perimeter1").process("process1").stateRi...
operatorfabric-core
positive
436,196
public static void e(String tag, String msg) { if (!DEBUG || TextUtils.isEmpty(tag) && TextUtils.isEmpty(msg)) { return; } final StackTraceElement[] stack = new Throwable().getStackTrace(); final int i = 2; final StackTraceElement ste = stack[i]; Log.println(Log.ERROR, LOG_TAG, String.format("[%s][%s][%s]%s", ste.getFi...
public static void e(String tag, String msg) { if (!DEBUG || TextUtils.isEmpty(tag) && TextUtils.isEmpty(msg)) { return; } <DeepExtract> final StackTraceElement[] stack = new Throwable().getStackTrace(); final int i = 2; final StackTraceElement ste = stack[i]; Log.println(Log.ERROR, LOG_TAG, String.format("[%s][%s][%s]...
Common
positive
436,197
protected void validateProperties(PropertiesContainer container, String containerName) { PropertiesWithMetadataContainer containerWithMetadata = MiscUtil.cast(container); for (Map.Entry<String, Object> property : containerWithMetadata.getProperties().entrySet()) { boolean isOverwritable = containerWithMetadata.getPrope...
protected void validateProperties(PropertiesContainer container, String containerName) { PropertiesWithMetadataContainer containerWithMetadata = MiscUtil.cast(container); <DeepExtract> for (Map.Entry<String, Object> property : containerWithMetadata.getProperties().entrySet()) { boolean isOverwritable = containerWithMet...
multiapps
positive
436,199
public List<List<Integer>> subsetsWithDup(int[] nums) { Arrays.sort(nums); results.add(new ArrayList<>(new ArrayList<>())); Integer last = null; for (int i = 0; i < nums.length; i++) { if (last != null && last == nums[i]) { continue; } last = nums[i]; new ArrayList<>().add(nums[i]); this.backtracking(nums, i + 1, new A...
public List<List<Integer>> subsetsWithDup(int[] nums) { Arrays.sort(nums); <DeepExtract> results.add(new ArrayList<>(new ArrayList<>())); Integer last = null; for (int i = 0; i < nums.length; i++) { if (last != null && last == nums[i]) { continue; } last = nums[i]; new ArrayList<>().add(nums[i]); this.backtracking(nums...
algorithm1024
positive
436,200
public void testComponentConfigurationWithPropertiesFieldsWithExpressions() throws Exception { final String xml = "<configuration>" + "<someProperties>" + "<property><name>${theName}</name><value>${theValue}</value></property>" + "<property><name>empty</name></property>" + "</someProperties>" + "</configuration>"; fina...
public void testComponentConfigurationWithPropertiesFieldsWithExpressions() throws Exception { final String xml = "<configuration>" + "<someProperties>" + "<property><name>${theName}</name><value>${theValue}</value></property>" + "<property><name>empty</name></property>" + "</someProperties>" + "</configuration>"; fina...
sisu
positive
436,201
@Override public Status delete(String table, String key) { if (debug) { System.out.println("Doing delete for key: " + key); } if (!lastTable.equals(table)) { lastTable = table; lastTableBytes = options.getClusterName().toTableName(table).toString().getBytes(); } final MutateRowRequest.Builder rowMutation = MutateRowReq...
@Override public Status delete(String table, String key) { if (debug) { System.out.println("Doing delete for key: " + key); } <DeepExtract> if (!lastTable.equals(table)) { lastTable = table; lastTableBytes = options.getClusterName().toTableName(table).toString().getBytes(); } </DeepExtract> final MutateRowRequest.Build...
anna
positive
436,202
private void onStopDrag() { View view = getChildAt(mDragPosition - getFirstVisiblePosition()); if (view != null) { view.setVisibility(View.VISIBLE); } if (mDragImageView != null) { mWindowManager.removeView(mDragImageView); mDragImageView = null; } }
private void onStopDrag() { View view = getChildAt(mDragPosition - getFirstVisiblePosition()); if (view != null) { view.setVisibility(View.VISIBLE); } <DeepExtract> if (mDragImageView != null) { mWindowManager.removeView(mDragImageView); mDragImageView = null; } </DeepExtract> }
protoshop-android
positive
436,204
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(com.alienpants.leafpicrevived.R.layout.activity_splash); getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LA...
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(com.alienpants.leafpicrevived.R.layout.activity_splash); getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LA...
leafpicrevived
positive
436,205
private NexuAPI buildAPI(final UIDisplay uiDisplay, final OperationFactory operationFactory) throws IOException { File nexuHome = getConfig().getNexuHome(); SCDatabase db = null; if (nexuHome != null) { File store = new File(nexuHome, "store.xml"); logger.info("Load database from " + store.getAbsolutePath()); db = Prod...
private NexuAPI buildAPI(final UIDisplay uiDisplay, final OperationFactory operationFactory) throws IOException { File nexuHome = getConfig().getNexuHome(); SCDatabase db = null; if (nexuHome != null) { File store = new File(nexuHome, "store.xml"); logger.info("Load database from " + store.getAbsolutePath()); db = Prod...
nexu
positive
436,206