before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
public static void main(String[] args) throws ClassNotFoundException { String path = "/Users/zhengjun/Workspaces/inspace/insurance_risk/src/main/java/com/qunar/insurance/statistic/dao/model/BlackListRecord.class"; FileSystemClassLoader loader = new FileSystemClassLoader(); byte[] classData = getClassData(path); if (cla...
public static void main(String[] args) throws ClassNotFoundException { String path = "/Users/zhengjun/Workspaces/inspace/insurance_risk/src/main/java/com/qunar/insurance/statistic/dao/model/BlackListRecord.class"; FileSystemClassLoader loader = new FileSystemClassLoader(); <DeepExtract> byte[] classData = getClassData(...
codehelper.generator
positive
4,262
private void enableDisable() { localUploadAction.setEnabled(isLocalItemSelected()); boolean isSelected = isRemoteItemSelected(); remoteDeleteAction.setEnabled(isSelected); remoteDownloadAction.setEnabled(isSelected); diffOverwriteAction.setEnabled(isDiffItemSelected()); }
private void enableDisable() { localUploadAction.setEnabled(isLocalItemSelected()); boolean isSelected = isRemoteItemSelected(); remoteDeleteAction.setEnabled(isSelected); remoteDownloadAction.setEnabled(isSelected); <DeepExtract> diffOverwriteAction.setEnabled(isDiffItemSelected()); </DeepExtract> }
swift-explorer
positive
4,263
@Test() public void formateWithLessDigitsTest() { Template<Number> template = mock(Template.class); when(template.getLanguage()).thenReturn("de"); when(template.getInputType()).thenReturn((Class) Number.class); TemplateContext<Number> context = contextFactory.createTemplateContext(template); context.bind(1000.55); Stri...
@Test() public void formateWithLessDigitsTest() { <DeepExtract> Template<Number> template = mock(Template.class); when(template.getLanguage()).thenReturn("de"); when(template.getInputType()).thenReturn((Class) Number.class); TemplateContext<Number> context = contextFactory.createTemplateContext(template); context.bind(...
wte4j
positive
4,265
public final Town newTown(String name, Resident creator) { Town town = new Town(name); for (World world : MinecraftServer.getServer().worldServers) { if (!MyTownUniverse.instance.worlds.contains(world.provider.dimensionId)) { getDatasource().saveWorld(world.provider.dimensionId); } } town.setSpawn(new Teleport(creator....
public final Town newTown(String name, Resident creator) { Town town = new Town(name); <DeepExtract> for (World world : MinecraftServer.getServer().worldServers) { if (!MyTownUniverse.instance.worlds.contains(world.provider.dimensionId)) { getDatasource().saveWorld(world.provider.dimensionId); } } town.setSpawn(new Tel...
MyTown2
positive
4,267
public String getModifierDesc() { if (this.modifierList == null || this.modifierList.size() == 0) return ""; StringBuilder sb = new StringBuilder(); for (String mod : this.modifierList) { sb.append(mod).append(" "); } StringBuilder sb = new StringBuilder(); if (modifierList != null) { for (String str : modifierList) { ...
public String getModifierDesc() { if (this.modifierList == null || this.modifierList.size() == 0) return ""; StringBuilder sb = new StringBuilder(); for (String mod : this.modifierList) { sb.append(mod).append(" "); } <DeepExtract> StringBuilder sb = new StringBuilder(); if (modifierList != null) { for (String str : mo...
vinja
positive
4,268
@Test public void isSupported_ridesInstalled_withoutProductPriority_andRedirectToSdkFlowVersion_shouldBeTrue() { int ridesMinVersion = REDIRECT_TO_SDK == REDIRECT_TO_SDK ? MIN_UBER_RIDES_VERSION_REDIRECT_FLOW_SUPPORTED : MIN_UBER_RIDES_VERSION_SUPPORTED; when(appProtocol.isInstalled(activity, UBER, ridesMinVersion)).th...
@Test public void isSupported_ridesInstalled_withoutProductPriority_andRedirectToSdkFlowVersion_shouldBeTrue() { <DeepExtract> int ridesMinVersion = REDIRECT_TO_SDK == REDIRECT_TO_SDK ? MIN_UBER_RIDES_VERSION_REDIRECT_FLOW_SUPPORTED : MIN_UBER_RIDES_VERSION_SUPPORTED; when(appProtocol.isInstalled(activity, UBER, ridesM...
rides-android-sdk
positive
4,269
public static void main(String[] args) { if (!parseArguments(args)) { return; } OutputClass outputBlob = new OutputClass(); outputBlob.setParams(new CompareParams(bamFilenames.get(0).substring(0, Math.min(64, bamFilenames.get(0).length())), wiggle, bedFilename, identityThreshold)); outputBlob.setStats(new MapRatioRecor...
public static void main(String[] args) { <DeepExtract> if (!parseArguments(args)) { return; } OutputClass outputBlob = new OutputClass(); outputBlob.setParams(new CompareParams(bamFilenames.get(0).substring(0, Math.min(64, bamFilenames.get(0).length())), wiggle, bedFilename, identityThreshold)); outputBlob.setStats(new...
varsim
positive
4,271
public BmlNodeBuilder red() { return withAttribute("color", String.join(",", String.valueOf(255), String.valueOf(0), String.valueOf(0))); }
public BmlNodeBuilder red() { <DeepExtract> return withAttribute("color", String.join(",", String.valueOf(255), String.valueOf(0), String.valueOf(0))); </DeepExtract> }
WurmServerModLauncher
positive
4,272
public static List<Location> getLocationsSince(List<Location> locationList, long timestamp) { List<Location> matchingLocations = new ArrayList<>(); for (Location location : locationList) { if (location.getTimestamp() < timestamp || location.getTimestamp() >= System.currentTimeMillis()) { continue; } matchingLocations.a...
public static List<Location> getLocationsSince(List<Location> locationList, long timestamp) { <DeepExtract> List<Location> matchingLocations = new ArrayList<>(); for (Location location : locationList) { if (location.getTimestamp() < timestamp || location.getTimestamp() >= System.currentTimeMillis()) { continue; } match...
BLE-Indoor-Positioning
positive
4,273
public void run() { if (startTime < 0) { System.err.format("[SERVER IS DOWN] %s%n", "Reconnecting to: " + UptimeClient.HOST + ':' + UptimeClient.PORT); } else { System.err.format("[UPTIME: %5ds] %s%n", (System.currentTimeMillis() - startTime) / 1000, "Reconnecting to: " + UptimeClient.HOST + ':' + UptimeClient.PORT); }...
public void run() { <DeepExtract> if (startTime < 0) { System.err.format("[SERVER IS DOWN] %s%n", "Reconnecting to: " + UptimeClient.HOST + ':' + UptimeClient.PORT); } else { System.err.format("[UPTIME: %5ds] %s%n", (System.currentTimeMillis() - startTime) / 1000, "Reconnecting to: " + UptimeClient.HOST + ':' + UptimeC...
netty
positive
4,274
@Override protected String getTicker(Pair pair) throws IOException, NoMarketDataException { JsonNode node = readJsonFromUrl("https://1ex.trade/api/stats?market=" + pair.getCoin() + "&currency=" + pair.getExchange()); if (node.has("errors")) { for (JsonNode n : node.get("errors")) { if (n.has("message")) { throw new IOE...
@Override protected String getTicker(Pair pair) throws IOException, NoMarketDataException { JsonNode node = readJsonFromUrl("https://1ex.trade/api/stats?market=" + pair.getCoin() + "&currency=" + pair.getExchange()); if (node.has("errors")) { for (JsonNode n : node.get("errors")) { if (n.has("message")) { throw new IOE...
libdynticker
positive
4,275
void fillNextSlot(byte[] key, byte[] value, MemoryPoolAddress nextAddress) { if (key.length > fixedKeyLength || value.length != fixedValueLength) { throw new IllegalArgumentException(String.format("Invalid request. Key length %d. fixed key length %d. Value length %d", key.length, fixedKeyLength, value.length)); } if (c...
void fillNextSlot(byte[] key, byte[] value, MemoryPoolAddress nextAddress) { <DeepExtract> if (key.length > fixedKeyLength || value.length != fixedValueLength) { throw new IllegalArgumentException(String.format("Invalid request. Key length %d. fixed key length %d. Value length %d", key.length, fixedKeyLength, value.len...
HaloDB
positive
4,276
@Override public void haveAnyText() { throw new NotFoundElException(element.getLocatable().getBy()); }
@Override public void haveAnyText() { <DeepExtract> throw new NotFoundElException(element.getLocatable().getBy()); </DeepExtract> }
teasy
positive
4,277
public <T> ResponseEntity<T> post(String url, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables) throws RestClientException { return restTemplate.exchange(url, HttpMethod.POST, requestEntity, responseType, uriVariables); }
public <T> ResponseEntity<T> post(String url, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables) throws RestClientException { <DeepExtract> return restTemplate.exchange(url, HttpMethod.POST, requestEntity, responseType, uriVariables); </DeepExtract> }
springbootexamples
positive
4,279
@Override public ESILStackItem execute(Deque<ESILCommand> stack) { for (ESILCommandObserver observer : observers) { observer.beforeExecution(this.command); } ESILStackItem result = this.command.execute(stack); for (ESILCommandObserver observer : observers) { observer.afterExecution(this.command); } return result; }
@Override public ESILStackItem execute(Deque<ESILCommand> stack) { for (ESILCommandObserver observer : observers) { observer.beforeExecution(this.command); } ESILStackItem result = this.command.execute(stack); <DeepExtract> for (ESILCommandObserver observer : observers) { observer.afterExecution(this.command); } </Deep...
bjoern
positive
4,280
public void restore(String id) { if (isEnded()) throw new IllegalStateException(String.format("State machine: %s is already ended. Can not be restored.", name)); if (stateMap.containsKey(id)) currentState = stateMap.get(id); throw new NoSuchElementException(String.format("The given state id: %s is not found", id)); }
public void restore(String id) { if (isEnded()) throw new IllegalStateException(String.format("State machine: %s is already ended. Can not be restored.", name)); <DeepExtract> if (stateMap.containsKey(id)) currentState = stateMap.get(id); throw new NoSuchElementException(String.format("The given state id: %s is not fou...
xState
positive
4,281
private String getNodeBlockStrategyProperty(Environment environment, int index) { return environment.getProperty(buildNodeAttribute(BLOCK_STRATEGY_ATTRIBUTE, index)); }
private String getNodeBlockStrategyProperty(Environment environment, int index) { <DeepExtract> return environment.getProperty(buildNodeAttribute(BLOCK_STRATEGY_ATTRIBUTE, index)); </DeepExtract> }
eventeum
positive
4,282
public void setTextColor(int textColor) { mTextColor = textColor; initPaint(); super.invalidate(); }
public void setTextColor(int textColor) { mTextColor = textColor; <DeepExtract> initPaint(); super.invalidate(); </DeepExtract> }
XinFrameworkLib
positive
4,283
@Before public void setUp() throws SQLException { when(executorContext.getActualTableName()).thenReturn("t_order_0"); when(snapshotAccessor.queryUndoData()).thenReturn(undoData); for (int i = 1; i <= 10; i++) { Map<String, Object> record = new HashMap<>(); record.put("order_id", i); record.put("user_id", i); record.put...
@Before public void setUp() throws SQLException { when(executorContext.getActualTableName()).thenReturn("t_order_0"); when(snapshotAccessor.queryUndoData()).thenReturn(undoData); <DeepExtract> for (int i = 1; i <= 10; i++) { Map<String, Object> record = new HashMap<>(); record.put("order_id", i); record.put("user_id", ...
opensharding-spi-impl
positive
4,284
public Fenix in(String field, String name, Object[] values, boolean match) { return this.doInByType(SqlKeyConst.SPACE, field, name, values, match, true); }
public Fenix in(String field, String name, Object[] values, boolean match) { <DeepExtract> return this.doInByType(SqlKeyConst.SPACE, field, name, values, match, true); </DeepExtract> }
fenix
positive
4,285
@Override public Object answer(InvocationOnMock invocationOnMock) throws Throwable { MatrixCursor cursor = new MatrixCursor(new String[] { "_id" }); for (int i = 0; i < n; i++) { cursor.addRow(new Object[] { "12345" }); } return cursor; }
@Override public Object answer(InvocationOnMock invocationOnMock) throws Throwable { <DeepExtract> MatrixCursor cursor = new MatrixCursor(new String[] { "_id" }); for (int i = 0; i < n; i++) { cursor.addRow(new Object[] { "12345" }); } return cursor; </DeepExtract> }
sms-backup-plus
positive
4,286
public void visit_MULTIEQUAL(Instruction instr, PcodeOp pcode) throws VisitorUnimplementedException { TVLBitVector result = new TVLBitVector(new GhidraSizeAdapter(pcode.getOutput().getSize())); AbstractState.Associate(pcode.getOutput(), result); }
public void visit_MULTIEQUAL(Instruction instr, PcodeOp pcode) throws VisitorUnimplementedException { <DeepExtract> TVLBitVector result = new TVLBitVector(new GhidraSizeAdapter(pcode.getOutput().getSize())); AbstractState.Associate(pcode.getOutput(), result); </DeepExtract> }
GhidraPAL
positive
4,287
@Nonnull public TileEntityType<T> getTileEntityType() { return this.getBlock(); }
@Nonnull public TileEntityType<T> getTileEntityType() { <DeepExtract> return this.getBlock(); </DeepExtract> }
Techarium
positive
4,288
private void onRefreshPressed(Bundle pBundle) { GpodderSettings settings = Singletons.i().getGpodderSettings(); if (settings.getDeviceId() == null) { Toast.makeText(this, R.string.set_up_account_first, Toast.LENGTH_SHORT).show(); Log.w(TAG, "Could not refresh due to missing account information"); return; } synchronized...
private void onRefreshPressed(Bundle pBundle) { GpodderSettings settings = Singletons.i().getGpodderSettings(); if (settings.getDeviceId() == null) { Toast.makeText(this, R.string.set_up_account_first, Toast.LENGTH_SHORT).show(); Log.w(TAG, "Could not refresh due to missing account information"); return; } synchronized...
detlef
positive
4,289
@Bean public ConnectionFactory connectionFactory() { CachingConnectionFactory factory = new CachingConnectionFactory(); factory.setAddresses(host + ":" + port); this.virtualHost = virtualHost; this.username = username; this.password = password; return factory; }
@Bean public ConnectionFactory connectionFactory() { CachingConnectionFactory factory = new CachingConnectionFactory(); factory.setAddresses(host + ":" + port); this.virtualHost = virtualHost; this.username = username; <DeepExtract> this.password = password; </DeepExtract> return factory; }
kkbinlog
positive
4,290
@Override public void addTranscriptionListener(TranscriptionListener listener) { listeners.add(listener); }
@Override public void addTranscriptionListener(TranscriptionListener listener) { <DeepExtract> listeners.add(listener); </DeepExtract> }
jigasi
positive
4,292
@Override public void onRestoreInstanceState(Parcelable state) { SavedState ss = (SavedState) state; mInKbMode = ss.inKbMode(); mTypedTimes = ss.getTypesTimes(); mInitialHourOfDay = ss.getHour(); mInitialMinute = ss.getMinute(); mIs24HourView = ss.is24HourMode(); mInKbMode = false; updateUI(ss.getCurrentItemShowing());...
@Override public void onRestoreInstanceState(Parcelable state) { SavedState ss = (SavedState) state; mInKbMode = ss.inKbMode(); mTypedTimes = ss.getTypesTimes(); <DeepExtract> mInitialHourOfDay = ss.getHour(); mInitialMinute = ss.getMinute(); mIs24HourView = ss.is24HourMode(); mInKbMode = false; updateUI(ss.getCurrentI...
AppCompat-Extension-Library
positive
4,293
public void foo2() { PerfUtil.instance().start2("manu-foo2"); PerfUtil.instance().start2("manu-bar2"); try { Thread.sleep(0); } catch (InterruptedException ignored) { } PerfUtil.instance().end("manu-bar2"); PerfUtil.instance().end("manu-foo2"); }
public void foo2() { PerfUtil.instance().start2("manu-foo2"); <DeepExtract> PerfUtil.instance().start2("manu-bar2"); try { Thread.sleep(0); } catch (InterruptedException ignored) { } PerfUtil.instance().end("manu-bar2"); </DeepExtract> PerfUtil.instance().end("manu-foo2"); }
hugegraph-common
positive
4,294
@Override public double getPosition() { ensureEnabled(); ensureEnabled(); return encoder.getDistance(); }
@Override public double getPosition() { ensureEnabled(); <DeepExtract> ensureEnabled(); return encoder.getDistance(); </DeepExtract> }
atalibj
positive
4,295
@Override public CustomerResponse method() { return executeSyncApiCall(api.updateCustomer(customer.getId(), customer)); }
@Override public CustomerResponse method() { <DeepExtract> return executeSyncApiCall(api.updateCustomer(customer.getId(), customer)); </DeepExtract> }
voucherify-java-sdk
positive
4,296
public void write(Node node) throws IOException { int nodeType = node.getNodeType(); switch(nodeType) { case Node.ELEMENT_NODE: writeElement((Element) node); break; case Node.ATTRIBUTE_NODE: writeAttribute((Attribute) node); break; case Node.TEXT_NODE: writeNodeText(node); break; case Node.CDATA_SECTION_NODE: writeCDAT...
public void write(Node node) throws IOException { <DeepExtract> int nodeType = node.getNodeType(); switch(nodeType) { case Node.ELEMENT_NODE: writeElement((Element) node); break; case Node.ATTRIBUTE_NODE: writeAttribute((Attribute) node); break; case Node.TEXT_NODE: writeNodeText(node); break; case Node.CDATA_SECTION_N...
androidpn
positive
4,297
public void collapseAll() { this.cancel(); if (!false) { resultViewer.collapseAll(); return; } if (resultViewer.getTree().getItemCount() == 0) { return; } this.schedule(); }
public void collapseAll() { <DeepExtract> this.cancel(); if (!false) { resultViewer.collapseAll(); return; } if (resultViewer.getTree().getItemCount() == 0) { return; } this.schedule(); </DeepExtract> }
eclipse-instasearch
positive
4,298
public static void assertCounterGreaterThan(Map expected, Map actual) { if (!false) { assertTrue("Expected smaller than actual", expected.size() >= actual.size()); } for (String group : actual.keySet()) { if (!false || expected.containsKey(group)) { assertTrue("Expected does not contain group [" + group + "]", expected...
public static void assertCounterGreaterThan(Map expected, Map actual) { <DeepExtract> if (!false) { assertTrue("Expected smaller than actual", expected.size() >= actual.size()); } for (String group : actual.keySet()) { if (!false || expected.containsKey(group)) { assertTrue("Expected does not contain group [" + group +...
cloudera-framework
positive
4,299
public hxDaedalus.data.Edge flipEdge(hxDaedalus.data.Edge edge) { hxDaedalus.data.Edge eBot_Top = edge; hxDaedalus.data.Edge eTop_Bot = edge.get_oppositeEdge(); hxDaedalus.data.Edge eLeft_Right = new hxDaedalus.data.Edge(); hxDaedalus.data.Edge eRight_Left = new hxDaedalus.data.Edge(); hxDaedalus.data.Edge eTop_Left = ...
public hxDaedalus.data.Edge flipEdge(hxDaedalus.data.Edge edge) { hxDaedalus.data.Edge eBot_Top = edge; hxDaedalus.data.Edge eTop_Bot = edge.get_oppositeEdge(); hxDaedalus.data.Edge eLeft_Right = new hxDaedalus.data.Edge(); hxDaedalus.data.Edge eRight_Left = new hxDaedalus.data.Edge(); hxDaedalus.data.Edge eTop_Left = ...
jwalkable
positive
4,300
public List<Resource> retrieveResources() { ArrayList<Resource> resources = new ArrayList<>(); Resource resource = null; if (transformerRoutesExternalFile != null && !transformerRoutesExternalFile.isBlank()) { resource = retrieveResource(transformerRoutesExternalFile); } if (resource == null || !resource.exists()) { re...
public List<Resource> retrieveResources() { ArrayList<Resource> resources = new ArrayList<>(); <DeepExtract> Resource resource = null; if (transformerRoutesExternalFile != null && !transformerRoutesExternalFile.isBlank()) { resource = retrieveResource(transformerRoutesExternalFile); } if (resource == null || !resource....
alfresco-transform-core
positive
4,301
public Object rule() throws RecognitionException { return null; }
public Object rule() throws RecognitionException { <DeepExtract> return null; </DeepExtract> }
jtcc
positive
4,302
@Override public void onClick(DialogInterface dialog, int position) { String selectedNumber = items[position].toString(); selectedNumber = selectedNumber.replace("-", ""); StringBuilder withoutSpace = new StringBuilder(); for (int i = 0; i < selectedNumber.length(); i++) { if (selectedNumber.charAt(i) == ' ') { continu...
@Override public void onClick(DialogInterface dialog, int position) { String selectedNumber = items[position].toString(); selectedNumber = selectedNumber.replace("-", ""); <DeepExtract> StringBuilder withoutSpace = new StringBuilder(); for (int i = 0; i < selectedNumber.length(); i++) { if (selectedNumber.charAt(i) == ...
owasp-seraphimdroid
positive
4,303
@Override public List<Order> listAll() { List<Order> orders = orderMapper.selectAll(); List<Order> orders = orderMapper.selectByUid(orders.getId()); for (Order o : orders) { o.setOrderItems(orderitemMapper.selectByOrder(o.getId())); for (Orderitem i : o.getOrderItems()) { int pid = i.getPid(); Product p = productMapper...
@Override public List<Order> listAll() { List<Order> orders = orderMapper.selectAll(); <DeepExtract> List<Order> orders = orderMapper.selectByUid(orders.getId()); for (Order o : orders) { o.setOrderItems(orderitemMapper.selectByOrder(o.getId())); for (Orderitem i : o.getOrderItems()) { int pid = i.getPid(); Product p =...
Gotrip
positive
4,304
public List<DistributedNode> getOnlineProcessors() { List<DistributedNode> distributedNodes = new ArrayList<>(); String nodePath = null; switch(DistributedNode.NodeType.PROCESSOR) { case CRAWLER: nodePath = ZookeeperPathConsts.CRAWLER; break; case PROCESSOR: nodePath = ZookeeperPathConsts.PROCESSOR; break; default: } t...
public List<DistributedNode> getOnlineProcessors() { <DeepExtract> List<DistributedNode> distributedNodes = new ArrayList<>(); String nodePath = null; switch(DistributedNode.NodeType.PROCESSOR) { case CRAWLER: nodePath = ZookeeperPathConsts.CRAWLER; break; case PROCESSOR: nodePath = ZookeeperPathConsts.PROCESSOR; break...
webhunger
positive
4,305
public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException { return _class(JMod.PUBLIC, name, ClassType.ANNOTATION_TYPE_DECL ? ClassType.INTERFACE : ClassType.CLASS); }
public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException { <DeepExtract> return _class(JMod.PUBLIC, name, ClassType.ANNOTATION_TYPE_DECL ? ClassType.INTERFACE : ClassType.CLASS); </DeepExtract> }
jaxb-codemodel
positive
4,306
public void generateCube(IBlock block) { BoundingBox box = block.getBoundingBox(new BlockNode(0, 0, 0)); double x = box.min.x - 0.5; double y = box.min.y - 0.5; double z = box.min.z - 0.5; double xsize = box.max.x; double ysize = box.max.y; double zsize = box.max.z; this.pos.add(new Vector3d(x, y + ysize, z + zsize)); ...
public void generateCube(IBlock block) { BoundingBox box = block.getBoundingBox(new BlockNode(0, 0, 0)); double x = box.min.x - 0.5; double y = box.min.y - 0.5; double z = box.min.z - 0.5; double xsize = box.max.x; double ysize = box.max.y; double zsize = box.max.z; this.pos.add(new Vector3d(x, y + ysize, z + zsize)); ...
Voxel
positive
4,308
@Override public void onAnimationEnd(Animator animation) { mCallbacks.onDismiss(mView, mToken); }
@Override public void onAnimationEnd(Animator animation) { <DeepExtract> mCallbacks.onDismiss(mView, mToken); </DeepExtract> }
natrium-android-wallet
positive
4,309
public boolean isSymmetric(TreeNode root) { if (null == root) return true; if (null == root.left && null == root.right) return true; if (null != root.left && null != root.right && root.left.val == root.right.val) { return isMirror(root.left.left, root.right.right) && isMirror(root.left.right, root.right.left); } return...
public boolean isSymmetric(TreeNode root) { if (null == root) return true; <DeepExtract> if (null == root.left && null == root.right) return true; if (null != root.left && null != root.right && root.left.val == root.right.val) { return isMirror(root.left.left, root.right.right) && isMirror(root.left.right, root.right.l...
leetcode-java
positive
4,310
@Override public void start() { Log.i(TAG, "prepare:: Preparing listener for sensor " + getSensorName()); mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_WB...
@Override public void start() { <DeepExtract> Log.i(TAG, "prepare:: Preparing listener for sensor " + getSensorName()); mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mRecorder.setAudioEncoder(MediaRecorder.Audio...
DataLogger
positive
4,311
public static List<Integer> inorderTraversal(TreeNode root) { List<Integer> res = new ArrayList<>(); if (root == null) return res; if (root == null) return; helper(res, root.left); res.add(root.val); helper(res, root.right); return res; }
public static List<Integer> inorderTraversal(TreeNode root) { List<Integer> res = new ArrayList<>(); if (root == null) return res; <DeepExtract> if (root == null) return; helper(res, root.left); res.add(root.val); helper(res, root.right); </DeepExtract> return res; }
cspiration
positive
4,312
private void sendOPEN(byte[] path, int mode) throws Exception { packet.reset(); putHEAD(buf, SSH_FXP_OPEN, 17 + path.length); buf.putInt(seq++); buf.putString(path); buf.putInt(mode); buf.putInt(0); getSession().write(packet, this, 17 + path.length + 4); }
private void sendOPEN(byte[] path, int mode) throws Exception { packet.reset(); <DeepExtract> putHEAD(buf, SSH_FXP_OPEN, 17 + path.length); </DeepExtract> buf.putInt(seq++); buf.putString(path); buf.putInt(mode); buf.putInt(0); getSession().write(packet, this, 17 + path.length + 4); }
jsch-documentation
positive
4,314
public void debuggingTerminated() { for (final IJavaLineBreakpoint breakpoint : breakpoints) { try { breakpoint.delete(); } catch (final CoreException e) { Activator.log(e); } } }
public void debuggingTerminated() { <DeepExtract> </DeepExtract> for (final IJavaLineBreakpoint breakpoint : breakpoints) { <DeepExtract> </DeepExtract> try { <DeepExtract> </DeepExtract> breakpoint.delete(); <DeepExtract> </DeepExtract> } catch (final CoreException e) { <DeepExtract> </DeepExtract> Activator.log(e); <...
reactive-inspector
positive
4,315
@Override public void onClick(View v) { SetTalkerItemDialog dialog = (SetTalkerItemDialog) ((AppCompatActivity) mContext).getSupportFragmentManager().findFragmentByTag("SetTalkerItemDialog"); if (dialog == null) { dialog = SetTalkerItemDialog.getNewInstance(username, position); dialog.setAdapter(adapter); } if (dialog....
@Override public void onClick(View v) { <DeepExtract> SetTalkerItemDialog dialog = (SetTalkerItemDialog) ((AppCompatActivity) mContext).getSupportFragmentManager().findFragmentByTag("SetTalkerItemDialog"); if (dialog == null) { dialog = SetTalkerItemDialog.getNewInstance(username, position); dialog.setAdapter(adapter);...
videocall-android
positive
4,318
public void onClick(View arg0) { showNoFileManagerAvailableDialog(); }
public void onClick(View arg0) { <DeepExtract> showNoFileManagerAvailableDialog(); </DeepExtract> }
safe
positive
4,319
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { List<String> tokens = getTokens(); String sanitizedText = joinStrings(tokens, ","); SpannableStringBuilder ssb = new SpannableStringBuilder(sanitizedText); Matcher matcher = mTokenPattern.matcher(sanitizedText); while (matcher....
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { <DeepExtract> List<String> tokens = getTokens(); String sanitizedText = joinStrings(tokens, ","); SpannableStringBuilder ssb = new SpannableStringBuilder(sanitizedText); Matcher matcher = mTokenPattern.matcher(sanitizedText); w...
quill
positive
4,320
public Criteria andProductIdGreaterThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "productId" + " cannot be null"); } criteria.add(new Criterion("product_id >", value)); return (Criteria) this; }
public Criteria andProductIdGreaterThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "productId" + " cannot be null"); } criteria.add(new Criterion("product_id >", value)); </DeepExtract> return (Criteria) this; }
springboot-weixin-alipay
positive
4,321
public static void addData(i.gishreloaded.gishcode.xray.XRayData data) { if (Block.getBlockById(data.getId()) == null) { ChatUtils.error("Block is null."); return; } LinkedList<XRayData> list = getDataById(data.getId()); if (list.isEmpty()) { addData(data); return; } boolean isId = false; boolean isMeta = false; for (X...
public static void addData(i.gishreloaded.gishcode.xray.XRayData data) { <DeepExtract> if (Block.getBlockById(data.getId()) == null) { ChatUtils.error("Block is null."); return; } LinkedList<XRayData> list = getDataById(data.getId()); if (list.isEmpty()) { addData(data); return; } boolean isId = false; boolean isMeta =...
Gish-Code-1.12.2
positive
4,322
@Override public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); super.writeToNBT(nbttagcompound); nbttagcompound.setInteger("currentTime", currentTime); nbttagcompound.setBoolean("canPlay", canPlay); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbttagcompound); ...
@Override public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); <DeepExtract> super.writeToNBT(nbttagcompound); nbttagcompound.setInteger("currentTime", currentTime); nbttagcompound.setBoolean("canPlay", canPlay); </DeepExtract> return new S35PacketUpdateTileEntity(xCoord, yCoord,...
Totemic
positive
4,323
@Override public ChessBitSet alliedPieces() { final ChessBitSet allBlackPieces = new ChessBitSet(); allBlackPieces.or(blackRooks); allBlackPieces.or(blackKnights); allBlackPieces.or(blackBishops); allBlackPieces.or(blackQueens); allBlackPieces.or(blackPawns); return allBlackPieces; }
@Override public ChessBitSet alliedPieces() { <DeepExtract> final ChessBitSet allBlackPieces = new ChessBitSet(); allBlackPieces.or(blackRooks); allBlackPieces.or(blackKnights); allBlackPieces.or(blackBishops); allBlackPieces.or(blackQueens); allBlackPieces.or(blackPawns); return allBlackPieces; </DeepExtract> }
BlackWidow-Chess
positive
4,324
private void timerInterrupt() { int delay = Stats.TimerTicks; delay += Lib.random(delay / 10) - (delay / 20); privilege.interrupt.schedule(delay, "timer", timerInterrupt); privilege.interrupt.schedule(1, "timerAG", autoGraderInterrupt); return privilege.stats.totalTicks; if (handler != null) handler.run(); }
private void timerInterrupt() { int delay = Stats.TimerTicks; delay += Lib.random(delay / 10) - (delay / 20); privilege.interrupt.schedule(delay, "timer", timerInterrupt); privilege.interrupt.schedule(1, "timerAG", autoGraderInterrupt); <DeepExtract> return privilege.stats.totalTicks; </DeepExtract> if (handler != null...
CS162
positive
4,325
@Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { NBTTagCompound nbt = pkt.func_148857_g(); super.readFromNBT(nbt); facing = nbt.getInteger("facing"); isOn = nbt.getBoolean("isOn"); }
@Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { NBTTagCompound nbt = pkt.func_148857_g(); <DeepExtract> super.readFromNBT(nbt); facing = nbt.getInteger("facing"); isOn = nbt.getBoolean("isOn"); </DeepExtract> }
Electro-Magic-Tools
positive
4,326
public void sendMesg(int i, String s) { Log.userinfo("AliceICQ: " + "Response to [" + i + "]: " + s, Log.LISTENERS); try { ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(); bytearrayoutputstream.write(14); bytearrayoutputstream.write(1); bytearrayoutputstream.write(toBytes(i)); bytearrayoutputs...
public void sendMesg(int i, String s) { <DeepExtract> Log.userinfo("AliceICQ: " + "Response to [" + i + "]: " + s, Log.LISTENERS); </DeepExtract> try { ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(); bytearrayoutputstream.write(14); bytearrayoutputstream.write(1); bytearrayoutputstream.write(...
charliebot
positive
4,327
@Override @SuppressWarnings("unchecked") public T top() { if (size == 0) { throw new EmptyStackException(); } return (T) elements[size - 1]; }
@Override @SuppressWarnings("unchecked") public T top() { <DeepExtract> if (size == 0) { throw new EmptyStackException(); } return (T) elements[size - 1]; </DeepExtract> }
spork
positive
4,328
public ConstExprValue foldAnd(final And expression) throws ConstExprException { throw new UnkownOperation("Unkown and operation on '" + this.className() + "'."); }
public ConstExprValue foldAnd(final And expression) throws ConstExprException { <DeepExtract> throw new UnkownOperation("Unkown and operation on '" + this.className() + "'."); </DeepExtract> }
cytosm
positive
4,329
public static void line(double x0, double y0, double x1, double y1) { offscreen.draw(new Line2D.Double(scaleX(x0), scaleY(y0), scaleX(x1), scaleY(y1))); if (defer) return; onscreen.drawImage(offscreenImage, 0, 0, null); frame.repaint(); }
public static void line(double x0, double y0, double x1, double y1) { offscreen.draw(new Line2D.Double(scaleX(x0), scaleY(y0), scaleX(x1), scaleY(y1))); <DeepExtract> if (defer) return; onscreen.drawImage(offscreenImage, 0, 0, null); frame.repaint(); </DeepExtract> }
skeleton-sp16
positive
4,330
public String getJCR_SCORE() { if (cache) { Map<Integer, String> map; if (JCR_NS.hashCode() == JCR_NS.hashCode()) map = jcrCacheMap; else map = ntCacheMap; String result = map.get(JCR_SCORE.hashCode()); if (result == null) result = computeName(JCR_NS, JCR_SCORE); map.put(JCR_SCORE.hashCode(), result); return result; } ...
public String getJCR_SCORE() { <DeepExtract> if (cache) { Map<Integer, String> map; if (JCR_NS.hashCode() == JCR_NS.hashCode()) map = jcrCacheMap; else map = ntCacheMap; String result = map.get(JCR_SCORE.hashCode()); if (result == null) result = computeName(JCR_NS, JCR_SCORE); map.put(JCR_SCORE.hashCode(), result); ret...
jcr-springextension
positive
4,331
public void recruitWalkOns() { walkon = true; int needs = minQBs - teamQBs.size(); for (int i = 0; i < teamQBs.size(); ++i) { if (teamQBs.get(i).isRedshirt || teamQBs.get(i).isTransfer) { needs++; } } for (int i = 0; i < needs; ++i) { star = (int) Math.random() * 2 + 1; teamQBs.add(new PlayerQB(league.getRandName(), 1,...
public void recruitWalkOns() { walkon = true; int needs = minQBs - teamQBs.size(); for (int i = 0; i < teamQBs.size(); ++i) { if (teamQBs.get(i).isRedshirt || teamQBs.get(i).isTransfer) { needs++; } } for (int i = 0; i < needs; ++i) { star = (int) Math.random() * 2 + 1; teamQBs.add(new PlayerQB(league.getRandName(), 1,...
CFB-Coach-v1
positive
4,332
@Override public void set(T value) { set(value); }
@Override public void set(T value) { <DeepExtract> set(value); </DeepExtract> }
durian
positive
4,333
public void attachToListView(@NonNull AbsListView listView, ScrollDirectionListener scrollDirectionListener, AbsListView.OnScrollListener onScrollListener) { AbsListViewScrollDetectorImpl scrollDetector = new AbsListViewScrollDetectorImpl(); mScrollDirectionListener = scrollDirectionListener; mOnScrollListener = onScro...
public void attachToListView(@NonNull AbsListView listView, ScrollDirectionListener scrollDirectionListener, AbsListView.OnScrollListener onScrollListener) { AbsListViewScrollDetectorImpl scrollDetector = new AbsListViewScrollDetectorImpl(); mScrollDirectionListener = scrollDirectionListener; mOnScrollListener = onScro...
TaoSchool
positive
4,334
public String toString() { return name; }
public String toString() { <DeepExtract> return name; </DeepExtract> }
libgdxjam
positive
4,335
@Override public void run() { collidable = !collidable; visible = collidable; }
@Override public void run() { <DeepExtract> collidable = !collidable; visible = collidable; </DeepExtract> }
AndroidPunk
positive
4,336
@Override public void onAnimationCancel(Animator animation) { String currentPassphraseType = AdminActions.getCurrentPassphraseType(); if (!Utility.checkForNullAndWarn(currentPassphraseType, LOG_TAG)) { if (currentPassphraseType.equals(Passphrase.TYPE_PATTERN) && AdminActions.getCurrentPassphraseString() != null) { getC...
@Override public void onAnimationCancel(Animator animation) { <DeepExtract> String currentPassphraseType = AdminActions.getCurrentPassphraseType(); if (!Utility.checkForNullAndWarn(currentPassphraseType, LOG_TAG)) { if (currentPassphraseType.equals(Passphrase.TYPE_PATTERN) && AdminActions.getCurrentPassphraseString() !...
SmartLockScreen
positive
4,337
@Test public void noDuplicate() throws Exception { JobParameters jobParameters = new JobParametersBuilder().addLong("date", System.currentTimeMillis()).toJobParameters(); emptyQueue(); fillInQueue(); Assert.assertEquals(13, orderQueueView.getQueueSize()); JobExecution exec = jobLauncher.run(updateInventoryJob, jobParam...
@Test public void noDuplicate() throws Exception { JobParameters jobParameters = new JobParametersBuilder().addLong("date", System.currentTimeMillis()).toJobParameters(); emptyQueue(); fillInQueue(); Assert.assertEquals(13, orderQueueView.getQueueSize()); JobExecution exec = jobLauncher.run(updateInventoryJob, jobParam...
Spring-Batch-in-Action
positive
4,338
@Override public void onClick(View v) { Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE); }
@Override public void onClick(View v) { <DeepExtract> Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE); </DeepExtract> }
ssuet-android-adv-mar17
positive
4,339
public void removeSubtype(IMELanguageWrapper item) { if (item.getType() == IMELanguageWrapper.TYPE_MULTI) { VertexInputMethodManager.getInstance().removeSubtype(item.getMultiIMELanguage().getSubtypeIMEList()); } else { VertexInputMethodManager.getInstance().removeSubtype(item.getIMELanguage()); } singleAddedList = Vert...
public void removeSubtype(IMELanguageWrapper item) { if (item.getType() == IMELanguageWrapper.TYPE_MULTI) { VertexInputMethodManager.getInstance().removeSubtype(item.getMultiIMELanguage().getSubtypeIMEList()); } else { VertexInputMethodManager.getInstance().removeSubtype(item.getIMELanguage()); } <DeepExtract> singleAd...
Android-Keyboard
positive
4,341
@TargetApi(18) private static void endSectionV18() { if (ExoPlayerLibraryInfo.TRACE_ENABLED && Util.SDK_INT >= 18) { endSectionV18(); } }
@TargetApi(18) private static void endSectionV18() { <DeepExtract> if (ExoPlayerLibraryInfo.TRACE_ENABLED && Util.SDK_INT >= 18) { endSectionV18(); } </DeepExtract> }
ExoPlayerLeanback
positive
4,342
public void saveTheme() { this.theme = theme; }
public void saveTheme() { <DeepExtract> this.theme = theme; </DeepExtract> }
primefaces-blueprints
positive
4,343
@Override public void hSet(@NonNull CacheHashKey key, Object value, boolean... cacheNullValues) { if (value == null) { return; } Caffeine<Object, Object> builder = Caffeine.newBuilder().maximumSize(DEF_MAX_SIZE); if (key.tran().getExpire() != null) { builder.expireAfterWrite(key.tran().getExpire()); } Cache<String, Obj...
@Override public void hSet(@NonNull CacheHashKey key, Object value, boolean... cacheNullValues) { <DeepExtract> if (value == null) { return; } Caffeine<Object, Object> builder = Caffeine.newBuilder().maximumSize(DEF_MAX_SIZE); if (key.tran().getExpire() != null) { builder.expireAfterWrite(key.tran().getExpire()); } Cac...
lamp-util
positive
4,344
public <T> List<T> getBeanListByRaw(String sql, Class theClass) throws InstantiationException, IllegalAccessException { Cursor cursor = getReadableDatabase().rawQuery(sql, null); if (cursor == null) return null; return cursor2List(cursor, theClass, null); }
public <T> List<T> getBeanListByRaw(String sql, Class theClass) throws InstantiationException, IllegalAccessException { Cursor cursor = getReadableDatabase().rawQuery(sql, null); if (cursor == null) return null; <DeepExtract> return cursor2List(cursor, theClass, null); </DeepExtract> }
DereHelper
positive
4,346
@Override public Set<String> getSpikes(Reuters21578 story) { Set<String> spikes = new HashSet<String>(); cal.setTime(story.getDate()); spikes.add("month=" + cal.get(Calendar.MONTH)); spikes.add("day_of_week=" + cal.get(Calendar.DAY_OF_WEEK)); spikes.add("year=" + cal.get(Calendar.YEAR)); spikes.add("day_of_month=" + ca...
@Override public Set<String> getSpikes(Reuters21578 story) { Set<String> spikes = new HashSet<String>(); cal.setTime(story.getDate()); spikes.add("month=" + cal.get(Calendar.MONTH)); spikes.add("day_of_week=" + cal.get(Calendar.DAY_OF_WEEK)); spikes.add("year=" + cal.get(Calendar.YEAR)); spikes.add("day_of_month=" + ca...
AHaH
positive
4,347
public void newActivity(Vertex vertex) throws IOException { String s = keyword("activity") + "(" + vertex.getID() + "," + attOrMarker(vertex.getAttribute("startTime")) + "," + attOrMarker(vertex.getAttribute("endTime")) + optionalAttributes(vertex.getAttributes()) + ")"; buffer.write(s); if (!standaloneExpression) { bu...
public void newActivity(Vertex vertex) throws IOException { String s = keyword("activity") + "(" + vertex.getID() + "," + attOrMarker(vertex.getAttribute("startTime")) + "," + attOrMarker(vertex.getAttribute("endTime")) + optionalAttributes(vertex.getAttributes()) + ")"; <DeepExtract> buffer.write(s); if (!standaloneEx...
prov-viewer
positive
4,348
protected void logPrefRm(String key) { Logging.logd("Pref " + "'" + key + "' removed."); }
protected void logPrefRm(String key) { <DeepExtract> Logging.logd("Pref " + "'" + key + "' removed."); </DeepExtract> }
Cornowser
positive
4,349
@Test public void testReferenceTypeFieldsClassPackBufferUnpack() throws Exception { super.testReferenceTypeFieldsClass(); }
@Test public void testReferenceTypeFieldsClassPackBufferUnpack() throws Exception { <DeepExtract> super.testReferenceTypeFieldsClass(); </DeepExtract> }
msgpack-java
positive
4,350
public AccountDto getAccountByPhoneNumber(String phoneNumber) { Account account = accountRepo.findAccountByPhoneNumber(phoneNumber); if (account == null) { throw new ServiceException(ResultCode.NOT_FOUND, "User with specified phonenumber not found"); } return modelMapper.map(account, AccountDto.class); }
public AccountDto getAccountByPhoneNumber(String phoneNumber) { Account account = accountRepo.findAccountByPhoneNumber(phoneNumber); if (account == null) { throw new ServiceException(ResultCode.NOT_FOUND, "User with specified phonenumber not found"); } <DeepExtract> return modelMapper.map(account, AccountDto.class); </...
staffjoy
positive
4,351
public final void inverse_attr(AST _t, String forClass) throws RecognitionException { AST inverse_attr_AST_in; if (_t == ASTNULL) { inverse_attr_AST_in = null; } else { inverse_attr_AST_in = _t; } returnAST = null; ASTPair currentAST = new ASTPair(); AST inverse_attr_AST = null; String attrib, entity, attrib_ref = ""; ...
public final void inverse_attr(AST _t, String forClass) throws RecognitionException { <DeepExtract> AST inverse_attr_AST_in; if (_t == ASTNULL) { inverse_attr_AST_in = null; } else { inverse_attr_AST_in = _t; } </DeepExtract> returnAST = null; ASTPair currentAST = new ASTPair(); AST inverse_attr_AST = null; String attr...
BuildingSMARTLibrary
positive
4,352
void readAndStore(DataMap dataMap, String key, DataBundleValue value, List<Asset> assets) { dataMap.putByteArray(key, read(value, assets)); }
void readAndStore(DataMap dataMap, String key, DataBundleValue value, List<Asset> assets) { <DeepExtract> dataMap.putByteArray(key, read(value, assets)); </DeepExtract> }
android_external_GmsLib
positive
4,353
@Override public void paintComponent(Graphics g) { super.paintComponent(g); (Graphics2D) g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); (Graphics2D) g.setColor(new Color(180, 180, 180)); (Graphics2D) g.setFont(new Font("Arial", Font.ITALIC | Font.BOLD, 9)); (Graphics2D...
@Override public void paintComponent(Graphics g) { super.paintComponent(g); <DeepExtract> (Graphics2D) g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); (Graphics2D) g.setColor(new Color(180, 180, 180)); (Graphics2D) g.setFont(new Font("Arial", Font.ITALIC | Font.BOLD, 9)...
ToastAPI
positive
4,354
@CallSuper @Override public void onBindViewHolder(final PreferenceViewHolder holder) { super.onBindViewHolder(holder); View view = holder.findViewById(R.id.compound_button); if (view instanceof CompoundButton) { CompoundButton compoundButton = (CompoundButton) view; compoundButton.setOnCheckedChangeListener(null); comp...
@CallSuper @Override public void onBindViewHolder(final PreferenceViewHolder holder) { super.onBindViewHolder(holder); <DeepExtract> View view = holder.findViewById(R.id.compound_button); if (view instanceof CompoundButton) { CompoundButton compoundButton = (CompoundButton) view; compoundButton.setOnCheckedChangeListen...
AndroidMaterialPreferences
positive
4,355
private void validateNetwork(MultiLayerPerceptron network) { int numberOfWinners = 0; int numberOfGames = 0; NetworkMetrics metrics = networkMetricsCache.get(network); log.info("********* BEGINNING VALIDATION FOR YEARS " + Arrays.toString(metrics.getSimulationYears()) + " **************"); for (Integer yearToSimulate :...
private void validateNetwork(MultiLayerPerceptron network) { int numberOfWinners = 0; int numberOfGames = 0; NetworkMetrics metrics = networkMetricsCache.get(network); log.info("********* BEGINNING VALIDATION FOR YEARS " + Arrays.toString(metrics.getSimulationYears()) + " **************"); for (Integer yearToSimulate :...
developerWorks
positive
4,356
@CheckForNull public static String getToneCompensationAsString(final int toneComp) { String string = (String) toneCompMap.get(toneComp); return (string != null) ? string : ("#" + toneComp + " - 0x" + Integer.toHexString(toneComp)); }
@CheckForNull public static String getToneCompensationAsString(final int toneComp) { <DeepExtract> String string = (String) toneCompMap.get(toneComp); return (string != null) ? string : ("#" + toneComp + " - 0x" + Integer.toHexString(toneComp)); </DeepExtract> }
jrawio-src
positive
4,357
public static String getAuthUsername() { if (cacheMap.containsKey(CONFIG_AUTH_USERNAME)) { return (String) cacheMap.get(CONFIG_AUTH_USERNAME); } String val = getConfig(CONFIG_AUTH_USERNAME); if (StringUtils.isBlank(val)) { return null; } cacheMap.put(CONFIG_AUTH_USERNAME, val); return val; }
public static String getAuthUsername() { <DeepExtract> if (cacheMap.containsKey(CONFIG_AUTH_USERNAME)) { return (String) cacheMap.get(CONFIG_AUTH_USERNAME); } String val = getConfig(CONFIG_AUTH_USERNAME); if (StringUtils.isBlank(val)) { return null; } cacheMap.put(CONFIG_AUTH_USERNAME, val); return val; </DeepExtract> ...
apollo-sentinel-dashboard
positive
4,358
@Override public void run() { if (--refCount == 0) { releaseCallback.run(); } }
@Override public void run() { <DeepExtract> if (--refCount == 0) { releaseCallback.run(); } </DeepExtract> }
VideoCRE
positive
4,359
public Criteria andTempurlidLessThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "tempurlid" + " cannot be null"); } criteria.add(new Criterion("tempUrlID <=", value)); return (Criteria) this; }
public Criteria andTempurlidLessThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "tempurlid" + " cannot be null"); } criteria.add(new Criterion("tempUrlID <=", value)); </DeepExtract> return (Criteria) this; }
answerWeb
positive
4,360
private void init() { setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); setOrientation(VERTICAL); mStatus = new RelativeLayout(getContext()); setStatusBarBackgroundColor(statusBarBackgroundColor); setNavigationBarBackgroundColor(statusBarBackgroundColor); mStatus.setLayoutParams(n...
private void init() { setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); setOrientation(VERTICAL); mStatus = new RelativeLayout(getContext()); setStatusBarBackgroundColor(statusBarBackgroundColor); setNavigationBarBackgroundColor(statusBarBackgroundColor); mStatus.setLayoutParams(n...
Auie
positive
4,361
public ImageIcon RefreshIcon() { try { URL iconPath = getClass().getClassLoader().getResource(Refresh); return new ImageIcon(new ImageIcon(iconPath).getImage()); } catch (Exception ex) { LogWriter.WriteToLog(ex.fillInStackTrace()); return new ImageIcon(createTransparentImage(1, 1)); } }
public ImageIcon RefreshIcon() { <DeepExtract> try { URL iconPath = getClass().getClassLoader().getResource(Refresh); return new ImageIcon(new ImageIcon(iconPath).getImage()); } catch (Exception ex) { LogWriter.WriteToLog(ex.fillInStackTrace()); return new ImageIcon(createTransparentImage(1, 1)); } </DeepExtract> }
MQAdminTool
positive
4,362
public void reset() { fields.forEach(PropertyField::resetToDefault); if (model.get() != null) { for (final PropertyField<?, M, ?> field : fields) { if (field.isDifferent(model.get())) { diffFlag.set(true); return; } } diffFlag.set(false); } }
public void reset() { fields.forEach(PropertyField::resetToDefault); <DeepExtract> if (model.get() != null) { for (final PropertyField<?, M, ?> field : fields) { if (field.isDifferent(model.get())) { diffFlag.set(true); return; } } diffFlag.set(false); } </DeepExtract> }
javafx-qiniu-tinypng-client
positive
4,363
protected void notifyFrameChangeListener(long now, int frame) { }
protected void notifyFrameChangeListener(long now, int frame) { <DeepExtract> </DeepExtract> }
etyl
positive
4,364
private String getOutput() { csvPrinter.flush(); final String output = writer.getBuffer().toString(); writer.getBuffer().setLength(0); return output; }
private String getOutput() { <DeepExtract> csvPrinter.flush(); </DeepExtract> final String output = writer.getBuffer().toString(); writer.getBuffer().setLength(0); return output; }
freemarker-generator
positive
4,365
public byte[] getBytes() { ByteBuffer data = this.data.duplicate(); byte[] result = new byte[data.capacity()]; data.position(0); checkBounds(result, tableOfContents.stringIds.size); int stringOff = openSection(tableOfContents.stringIds.off + (result * SizeOf.STRING_ID_ITEM)).readInt(); return openSection(stringOff).rea...
public byte[] getBytes() { ByteBuffer data = this.data.duplicate(); byte[] result = new byte[data.capacity()]; data.position(0); <DeepExtract> checkBounds(result, tableOfContents.stringIds.size); int stringOff = openSection(tableOfContents.stringIds.off + (result * SizeOf.STRING_ID_ITEM)).readInt(); return openSection(...
tinker-dex-dump
positive
4,366
public Schema getAvroSchema() { if (_valueSchema != null) { return _valueSchema; } if (_builder == null) { throw new IllegalStateException("No visit methods called on " + getClass().getName() + ": no schema generated"); } return Schema.create(Schema.Type.BYTES); }
public Schema getAvroSchema() { if (_valueSchema != null) { return _valueSchema; } if (_builder == null) { throw new IllegalStateException("No visit methods called on " + getClass().getName() + ": no schema generated"); } <DeepExtract> return Schema.create(Schema.Type.BYTES); </DeepExtract> }
jackson-dataformat-avro
positive
4,367
public Criteria andDeliverOrderIdNotEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "deliverOrderId" + " cannot be null"); } criteria.add(new Criterion("deliver_order_id <>", value)); return (Criteria) this; }
public Criteria andDeliverOrderIdNotEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "deliverOrderId" + " cannot be null"); } criteria.add(new Criterion("deliver_order_id <>", value)); </DeepExtract> return (Criteria) this; }
XiaoMiShop
positive
4,368
@Nonnull public static Value readSettings(Context context, SharedPreferences prefs, String sharedPrefsName) { final SerialLineConfiguration conf; final String baudrate, dataBits, parity, stopBits; conf = new SerialLineConfiguration(); baudrate = prefs.getString(KEY_DEVICE_BAUDRATE, null); dataBits = prefs.getString(KEY...
@Nonnull public static Value readSettings(Context context, SharedPreferences prefs, String sharedPrefsName) { final SerialLineConfiguration conf; final String baudrate, dataBits, parity, stopBits; conf = new SerialLineConfiguration(); baudrate = prefs.getString(KEY_DEVICE_BAUDRATE, null); dataBits = prefs.getString(KEY...
RtkGps
positive
4,369
private void addRadarScanFragment() { android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager(); FragmentTransaction ft = fragmentManager.beginTransaction(); boolean fragmentPopped = false; Fragment fragment = fragmentManager.findFragmentByTag(Constants.TAG_FRAGMENT_SCAN_RADAR); if (fragmentM...
private void addRadarScanFragment() { <DeepExtract> android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager(); FragmentTransaction ft = fragmentManager.beginTransaction(); boolean fragmentPopped = false; Fragment fragment = fragmentManager.findFragmentByTag(Constants.TAG_FRAGMENT_SCAN_RADAR);...
beaconloc
positive
4,370
@Override @SuppressWarnings("unchecked") public Decision given(FactMap facts) { _rule.given(facts); for (Field field : getAnnotatedFields(Given.class, _rulePojo.getClass())) { Given given = field.getAnnotation(Given.class); try { field.setAccessible(true); if (field.getType() == Fact.class) { field.set(_rulePojo, getFa...
@Override @SuppressWarnings("unchecked") public Decision given(FactMap facts) { _rule.given(facts); <DeepExtract> for (Field field : getAnnotatedFields(Given.class, _rulePojo.getClass())) { Given given = field.getAnnotation(Given.class); try { field.setAccessible(true); if (field.getType() == Fact.class) { field.set(_r...
rulebook
positive
4,372
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.upload_main); vodCertificateMultiUpload = (Button) findViewById(R.id.vod_certificate_multi_upload); vodCertificateMultiUpload.setOnClickListener(this); if (!checkPermissionsGroup(this, PE...
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.upload_main); vodCertificateMultiUpload = (Button) findViewById(R.id.vod_certificate_multi_upload); vodCertificateMultiUpload.setOnClickListener(this); <DeepExtract> if (!checkPermissions...
alibabacloud-vodupload-sdk
positive
4,373