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 mDotMobileDeviceNormalPreference() throws Exception { device.setDeviceType(DeviceType.MOBILE); request.addParameter("site_preference", "normal"); SiteSwitcherRequestFilter mDot = new SiteSwitcherRequestFilter(); MockFilterConfig filterConfig = new MockFilterConfig(); filterConfig.addInitParameter("swi...
@Test public void mDotMobileDeviceNormalPreference() throws Exception { device.setDeviceType(DeviceType.MOBILE); request.addParameter("site_preference", "normal"); <DeepExtract> SiteSwitcherRequestFilter mDot = new SiteSwitcherRequestFilter(); MockFilterConfig filterConfig = new MockFilterConfig(); filterConfig.addInit...
spring-mobile
positive
438,930
private void addSaveData(Object object) { if (sqlTaskRunning) return; sqlTaskRunning = true; P.p.getServer().getScheduler().runTaskAsynchronously(P.p, new SQLSaver()); try { if (!saveDataQueue.offer(object, 5, TimeUnit.SECONDS)) { BConfig.sqlSync = null; closeConnection(); P.p.errorLog("SQL saving queue overrun, disabl...
private void addSaveData(Object object) { <DeepExtract> if (sqlTaskRunning) return; sqlTaskRunning = true; P.p.getServer().getScheduler().runTaskAsynchronously(P.p, new SQLSaver()); </DeepExtract> try { if (!saveDataQueue.offer(object, 5, TimeUnit.SECONDS)) { BConfig.sqlSync = null; closeConnection(); P.p.errorLog("SQL...
Brewery
positive
438,932
@GetMapping(value = "/{flow}/{buildNumber}/yml", produces = MediaType.APPLICATION_JSON_VALUE) @Action(JobAction.GET_YML) public String getYml(@PathVariable String flow, @PathVariable String buildNumber) { Job job; Flow flow = flowService.get(flow); if (ParameterLatest.equals(buildNumber)) { job = jobService.getLatest(f...
@GetMapping(value = "/{flow}/{buildNumber}/yml", produces = MediaType.APPLICATION_JSON_VALUE) @Action(JobAction.GET_YML) public String getYml(@PathVariable String flow, @PathVariable String buildNumber) { <DeepExtract> Job job; Flow flow = flowService.get(flow); if (ParameterLatest.equals(buildNumber)) { job = jobServi...
flow-platform-x
positive
438,934
@Override public String execute(InterledgerPacket packet) { assertThat("The read packet is an instance of QuoteLiquidityRequest", packet instanceof QuoteLiquidityRequest); QuoteLiquidityRequest decoded = (QuoteLiquidityRequest) packet; assertThat("The decoded packet has the same InterledgerAddress", decoded.getDestinat...
@Override public String execute(InterledgerPacket packet) { <DeepExtract> assertThat("The read packet is an instance of QuoteLiquidityRequest", packet instanceof QuoteLiquidityRequest); QuoteLiquidityRequest decoded = (QuoteLiquidityRequest) packet; assertThat("The decoded packet has the same InterledgerAddress", decod...
java-ilp-core
positive
438,935
@Override public SSLSocket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException { SSLSocket sslSocket = (SSLSocket) wrappedFactory.createSocket(host, port, localHost, localPort); if (diffieHellmanDisabled) { List<String> limited = new LinkedList<String>(); f...
@Override public SSLSocket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException { <DeepExtract> SSLSocket sslSocket = (SSLSocket) wrappedFactory.createSocket(host, port, localHost, localPort); if (diffieHellmanDisabled) { List<String> limited = new LinkedLis...
pircbotx
positive
438,937
@Override public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) { int left = parent.getPaddingLeft(); int right = parent.getWidth() - parent.getPaddingRight(); int childCount = parent.getChildCount(); for (int i = 0; i < childCount; i++) { View child = parent.getChildAt(i); RecyclerView.LayoutPara...
@Override public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) { int left = parent.getPaddingLeft(); int right = parent.getWidth() - parent.getPaddingRight(); int childCount = parent.getChildCount(); for (int i = 0; i < childCount; i++) { View child = parent.getChildAt(i); RecyclerView.LayoutPara...
Utils-master
positive
438,941
public static String getAlbumDir() { String dir = getAppDir() + "/album/"; File file = new File(dir); if (!file.exists()) { file.mkdirs(); } return dir; }
public static String getAlbumDir() { String dir = getAppDir() + "/album/"; <DeepExtract> File file = new File(dir); if (!file.exists()) { file.mkdirs(); } return dir; </DeepExtract> }
funk
positive
438,943
private static Tensor _vs_rescale(StateRaster stateRaster, DiscreteQsa qsa) { DiscreteVs vs = DiscreteUtils.createVs(stateRaster.discreteModel(), qsa); DiscreteModel discreteModel = stateRaster.discreteModel(); Dimension dimension = stateRaster.dimensionStateRaster(); Tensor tensor = Array.of(list -> DoubleScalar.INDET...
private static Tensor _vs_rescale(StateRaster stateRaster, DiscreteQsa qsa) { DiscreteVs vs = DiscreteUtils.createVs(stateRaster.discreteModel(), qsa); <DeepExtract> DiscreteModel discreteModel = stateRaster.discreteModel(); Dimension dimension = stateRaster.dimensionStateRaster(); Tensor tensor = Array.of(list -> Doub...
subare
positive
438,944
public void write(org.apache.thrift.protocol.TProtocol oprot, Log_result struct) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop();...
public void write(org.apache.thrift.protocol.TProtocol oprot, Log_result struct) throws org.apache.thrift.TException { <DeepExtract> </DeepExtract> oprot.writeStructBegin(STRUCT_DESC); <DeepExtract> </DeepExtract> if (struct.success != null) { <DeepExtract> </DeepExtract> oprot.writeFieldBegin(SUCCESS_FIELD_DESC); <Dee...
incubator-retired-htrace
positive
438,945
public void copy(JPanel layer, Tree.BuildTree buildTree) throws ParseException { selectionComponentFound = false; copyTree = null; Component[] components = layer.getComponents(); int i = 0; while (i < components.length) { Color colour = new Color(Color.LIGHT_GRAY.getRGB()); if (components[i].getBackground().equals(colo...
public void copy(JPanel layer, Tree.BuildTree buildTree) throws ParseException { selectionComponentFound = false; copyTree = null; <DeepExtract> Component[] components = layer.getComponents(); int i = 0; while (i < components.length) { Color colour = new Color(Color.LIGHT_GRAY.getRGB()); if (components[i].getBackground...
dragmath
positive
438,948
@Override public boolean process(final Client client, List<String> args) throws CommandProcessingException { boolean checksOk = super.process(client, args); if (!checksOk) { return false; } Battle battle = getBattle(client); String newBattleStatusStr = args.get(0); String teamColorStr = args.get(1); try { newBattleStat...
@Override public boolean process(final Client client, List<String> args) throws CommandProcessingException { boolean checksOk = super.process(client, args); if (!checksOk) { return false; } Battle battle = getBattle(client); String newBattleStatusStr = args.get(0); String teamColorStr = args.get(1); try { newBattleStat...
SpringLS
positive
438,949
@Test public void testPriorityQueue() throws Exception { FetchQueue queue = new FetchQueue(2); queue.open(); CrawlStateUrl url1 = new CrawlStateUrl(new RawUrl("http://domain.com/page1")); url1.setScore(1.0f); assertNull(queue.add(url1)); CrawlStateUrl url2 = new CrawlStateUrl(new RawUrl("http://domain.com/page2")); url...
@Test public void testPriorityQueue() throws Exception { FetchQueue queue = new FetchQueue(2); queue.open(); CrawlStateUrl url1 = new CrawlStateUrl(new RawUrl("http://domain.com/page1")); url1.setScore(1.0f); assertNull(queue.add(url1)); CrawlStateUrl url2 = new CrawlStateUrl(new RawUrl("http://domain.com/page2")); url...
flink-crawler
positive
438,950
public static File fileToOpen(String filter) { if (null != null && null.exists()) openD.setDirectory(null.getParent()); applyFilter(filter, openD); openD.setVisible(true); String fa = openD.getFile(); if (fa == null) return null; return new File(openD.getDirectory(), fa); }
public static File fileToOpen(String filter) { <DeepExtract> if (null != null && null.exists()) openD.setDirectory(null.getParent()); applyFilter(filter, openD); openD.setVisible(true); String fa = openD.getFile(); if (fa == null) return null; return new File(openD.getDirectory(), fa); </DeepExtract> }
SmallSimpleSafe
positive
438,951
private void mnuSaveAsActionPerformed(java.awt.event.ActionEvent evt) { codeFileChooser.setDialogTitle(Lang.t("save")); if (codeFileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { File f = codeFileChooser.getSelectedFile(); if (codeFileChooser.getFileFilter() == codeFileFilter && f.getName().lastIndexOf(...
private void mnuSaveAsActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> codeFileChooser.setDialogTitle(Lang.t("save")); if (codeFileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { File f = codeFileChooser.getSelectedFile(); if (codeFileChooser.getFileFilter() == codeFileFilter && f.getName(...
drmips
positive
438,952
public void show() { LinearLayout.LayoutParams lp = (LayoutParams) mFooterView.getLayoutParams(); lp.bottomMargin = 0; mFooterView.setLayoutParams(lp); }
public void show() { <DeepExtract> LinearLayout.LayoutParams lp = (LayoutParams) mFooterView.getLayoutParams(); lp.bottomMargin = 0; mFooterView.setLayoutParams(lp); </DeepExtract> }
BasisDependency
positive
438,955
protected void init() { String host; try { host = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { host = "UnknowHost"; } return host + "@" + UUIDUtil.random(); handlers.put("encode", new LengthBasedEncoder()); handlers.put("compress", new CompressionDownstreamHandler()); handlers.put("se...
protected void init() { String host; try { host = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { host = "UnknowHost"; } return host + "@" + UUIDUtil.random(); handlers.put("encode", new LengthBasedEncoder()); handlers.put("compress", new CompressionDownstreamHandler()); handlers.put("se...
summercool-hsf-copy
positive
438,956
private void initScriptCollection() { if (collectionScript != null) { return; } createRootDirIfNotExists(); File collectionFile = new File(getLibrariesPath() + BINARY_FILE); if (!collectionFile.exists()) { collectionScript = null; } String json = FileReaderUtil.readFile(collectionFile); if (json == null || json.isEmpty...
private void initScriptCollection() { if (collectionScript != null) { return; } <DeepExtract> createRootDirIfNotExists(); File collectionFile = new File(getLibrariesPath() + BINARY_FILE); if (!collectionFile.exists()) { collectionScript = null; } String json = FileReaderUtil.readFile(collectionFile); if (json == null |...
PackageTemplates
positive
438,957
private void moveFiles(List<FileItem> moveItems) { moveStartPath = directoryObject.getCurrentPath(); moveList = new ArrayList<>(moveItems); recyclerViewAdapter.cancelSelection(); recyclerViewAdapter.setMoveMode(true); isInMoveMode = true; ActionBar actionbar = ((AppCompatActivity) context).getSupportActionBar(); if (ac...
private void moveFiles(List<FileItem> moveItems) { moveStartPath = directoryObject.getCurrentPath(); moveList = new ArrayList<>(moveItems); recyclerViewAdapter.cancelSelection(); recyclerViewAdapter.setMoveMode(true); isInMoveMode = true; ActionBar actionbar = ((AppCompatActivity) context).getSupportActionBar(); if (ac...
rcloneExplorer
positive
438,959
private void initializeKeypadValues() { keyDownValues.put(Key.RIGHT, (byte) 0xE); keyDownValues.put(Key.LEFT, (byte) 0xD); keyDownValues.put(Key.UP, (byte) 0xB); keyDownValues.put(Key.DOWN, (byte) 0x7); keyDownValues.put(Key.A, (byte) 0xE); keyDownValues.put(Key.B, (byte) 0xD); keyDownValues.put(Key.SELECT, (byte) 0xB)...
private void initializeKeypadValues() { keyDownValues.put(Key.RIGHT, (byte) 0xE); keyDownValues.put(Key.LEFT, (byte) 0xD); keyDownValues.put(Key.UP, (byte) 0xB); keyDownValues.put(Key.DOWN, (byte) 0x7); keyDownValues.put(Key.A, (byte) 0xE); keyDownValues.put(Key.B, (byte) 0xD); keyDownValues.put(Key.SELECT, (byte) 0xB)...
AndroidGameBoyEmulator
positive
438,960
private void dispatchAvailabilityChanged(boolean available) { synchronized (mListeners) { final int N = mListeners.size(); boolean cleanup = false; for (int i = 0; i < N; i++) { FlashlightListener l = mListeners.get(i).get(); if (l != null) { if (DISPATCH_AVAILABILITY_CHANGED == DISPATCH_ERROR) { l.onFlashlightError();...
private void dispatchAvailabilityChanged(boolean available) { <DeepExtract> synchronized (mListeners) { final int N = mListeners.size(); boolean cleanup = false; for (int i = 0; i < N; i++) { FlashlightListener l = mListeners.get(i).get(); if (l != null) { if (DISPATCH_AVAILABILITY_CHANGED == DISPATCH_ERROR) { l.onFlas...
AndroidBase
positive
438,961
private void notifyDownLoadStart() { Toast toast = Toast.makeText(mContext, MSG_DOWN_LOAD_START, 5000); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); RemoteViews contentView = new RemoteViews(mPackageName, R.layout.cube_mints_update_notify); mNotification.icon = mIcon; mNotification.tickerText = MSG_DOWN_LOAD_S...
private void notifyDownLoadStart() { <DeepExtract> Toast toast = Toast.makeText(mContext, MSG_DOWN_LOAD_START, 5000); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); </DeepExtract> RemoteViews contentView = new RemoteViews(mPackageName, R.layout.cube_mints_update_notify); mNotification.icon = mIcon; mNotification...
cube-sdk
positive
438,962
public void setTag(ITag tag) { if (tag.getTags() == null || tag.getTags().isEmpty()) { return; } mCurrentTag = tag; invalidate(); }
public void setTag(ITag tag) { <DeepExtract> if (tag.getTags() == null || tag.getTags().isEmpty()) { return; } mCurrentTag = tag; invalidate(); </DeepExtract> }
jujuj
positive
438,965
@Override public void execute(final List<String> args, final File outputFile) throws ScriptException, IOException { doExecute(null, args, new FileOutputStream(outputFile)); }
@Override public void execute(final List<String> args, final File outputFile) throws ScriptException, IOException { <DeepExtract> doExecute(null, args, new FileOutputStream(outputFile)); </DeepExtract> }
jruby-maven-plugins
positive
438,967
public static int[] sort(List<Integer> sortVal, boolean asc) { count = 0; int[] idx = new int[sortVal.size()]; List<Integer> idxList = new ArrayList<Integer>(); for (int i = 0; i < sortVal.size(); i++) idxList.add(i); idxList = qSort(sortVal, idxList, asc); for (int i = 0; i < sortVal.size(); i++) idx[i] = idxList.get(...
public static int[] sort(List<Integer> sortVal, boolean asc) { <DeepExtract> count = 0; int[] idx = new int[sortVal.size()]; List<Integer> idxList = new ArrayList<Integer>(); for (int i = 0; i < sortVal.size(); i++) idxList.add(i); idxList = qSort(sortVal, idxList, asc); for (int i = 0; i < sortVal.size(); i++) idx[i] ...
lodreclib
positive
438,968
void handleConnCancel() { int num = askingPeers.getCount(); for (int i = 0; i < num; i++) { String peer = askingPeers.getItem(i); int sep_pos1 = peer.indexOf('('); int sep_pos2 = peer.indexOf(')'); String peer_addr = peer.substring(sep_pos1 + 1, sep_pos2); Log.d(TAG, "deny peer's connection attempt from: " + peer_addr)...
void handleConnCancel() { int num = askingPeers.getCount(); for (int i = 0; i < num; i++) { String peer = askingPeers.getItem(i); int sep_pos1 = peer.indexOf('('); int sep_pos2 = peer.indexOf(')'); String peer_addr = peer.substring(sep_pos1 + 1, sep_pos2); Log.d(TAG, "deny peer's connection attempt from: " + peer_addr)...
PeerDeviceNet_Src
positive
438,969
@Override public void adjustmentValueChanged(AdjustmentEvent e) { System.out.println("Case no " + slider.getValue()); int threshold = 120; BranchGroup scene = univ.getScene(); for (int i = scene.numChildren() - 1; i >= 1; i--) { if (scene.getChild(i) instanceof BranchGroup) if (scene.getChild(i).getCapability(BranchGro...
@Override public void adjustmentValueChanged(AdjustmentEvent e) { <DeepExtract> System.out.println("Case no " + slider.getValue()); int threshold = 120; BranchGroup scene = univ.getScene(); for (int i = scene.numChildren() - 1; i >= 1; i--) { if (scene.getChild(i) instanceof BranchGroup) if (scene.getChild(i).getCapabi...
VIB
positive
438,970
@Test public void testOneValue() { int[] a = { 4 }; Integer result = OrderStatistic.select(a, 1); Assert.assertEquals(4, result); result = OrderStatistic.selectIterative(a, 1); Assert.assertEquals(4, result); }
@Test public void testOneValue() { int[] a = { 4 }; <DeepExtract> Integer result = OrderStatistic.select(a, 1); Assert.assertEquals(4, result); result = OrderStatistic.selectIterative(a, 1); Assert.assertEquals(4, result); </DeepExtract> }
algorithms-java
positive
438,971
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { this.connectionState = ConnectionState.PROXY_CONNECT; for (ConnectionStateListener listener : connectionStateListeners) { listener.connectionStateChanged(config, ConnectionState.PROXY_CONNECT); } ProxyServerComponent.this.proxyServerSessi...
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { <DeepExtract> this.connectionState = ConnectionState.PROXY_CONNECT; for (ConnectionStateListener listener : connectionStateListeners) { listener.connectionStateChanged(config, ConnectionState.PROXY_CONNECT); } </DeepExtract> ProxyServerCo...
flyingsocks
positive
438,974
public static void file(final String tag, final Object content) { if (!sLogSwitch || (!sLog2ConsoleSwitch && !sLog2FileSwitch)) return; int type_low = FILE | D & 0x0f, type_high = FILE | D & 0xf0; if (type_low < sConsoleFilter && type_low < sFileFilter) return; final TagHead tagHead = processTagAndHead(tag); String bod...
public static void file(final String tag, final Object content) { <DeepExtract> if (!sLogSwitch || (!sLog2ConsoleSwitch && !sLog2FileSwitch)) return; int type_low = FILE | D & 0x0f, type_high = FILE | D & 0xf0; if (type_low < sConsoleFilter && type_low < sFileFilter) return; final TagHead tagHead = processTagAndHead(ta...
CrawlerForReader
positive
438,978
@Override public String get(String url) { com.squareup.okhttp.Request request = new com.squareup.okhttp.Request.Builder().url(url).get().build(); try { com.squareup.okhttp.Response response = httpClient.newCall(request).execute(); if (!response.isSuccessful()) throw new RuntimeException("Unexpected code " + response); ...
@Override public String get(String url) { com.squareup.okhttp.Request request = new com.squareup.okhttp.Request.Builder().url(url).get().build(); <DeepExtract> try { com.squareup.okhttp.Response response = httpClient.newCall(request).execute(); if (!response.isSuccessful()) throw new RuntimeException("Unexpected code "...
jfinal_qyweixin
positive
438,981
public void BackPropagate(final LabeledRAETree tree, Theta theta, int[] WordsIndexed) { int SentenceLength = WordsIndexed.length; if (tree.T.length != 2 * SentenceLength - 1) System.err.println("Bad Tree for backpropagation!"); DoubleMatrix GL = DoubleMatrix.zeros(HiddenSize, SentenceLength); Stack<Triplet<RAENode, Int...
public void BackPropagate(final LabeledRAETree tree, Theta theta, int[] WordsIndexed) { int SentenceLength = WordsIndexed.length; if (tree.T.length != 2 * SentenceLength - 1) System.err.println("Bad Tree for backpropagation!"); DoubleMatrix GL = DoubleMatrix.zeros(HiddenSize, SentenceLength); Stack<Triplet<RAENode, Int...
jrae
positive
438,983
public void manipulatePdf(String dest) throws IOException, SQLException { Listing_06_15_StampStationery stationary = new Listing_06_15_StampStationery(); DatabaseConnection connection = new HsqldbConnection("filmfestival"); PdfDocument pdfDoc = new PdfDocument(new PdfWriter(ORIGINAL)); Document doc = new Document(pdfDo...
public void manipulatePdf(String dest) throws IOException, SQLException { Listing_06_15_StampStationery stationary = new Listing_06_15_StampStationery(); DatabaseConnection connection = new HsqldbConnection("filmfestival"); PdfDocument pdfDoc = new PdfDocument(new PdfWriter(ORIGINAL)); Document doc = new Document(pdfDo...
i7js-book
positive
438,984
public Criteria andLogoNotLike(String value) { if (value == null) { throw new RuntimeException("Value for " + "logo" + " cannot be null"); } criteria.add(new Criterion("logo not like", value)); return (Criteria) this; }
public Criteria andLogoNotLike(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "logo" + " cannot be null"); } criteria.add(new Criterion("logo not like", value)); </DeepExtract> return (Criteria) this; }
oauth4j
positive
438,988
public static String arrayToCommaDelimitedString(Object[] arr) { if (isEmpty(arr)) { return ""; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < arr.length; i++) { if (i > 0) { sb.append(","); } sb.append(arr[i]); } return sb.toString(); }
public static String arrayToCommaDelimitedString(Object[] arr) { <DeepExtract> if (isEmpty(arr)) { return ""; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < arr.length; i++) { if (i > 0) { sb.append(","); } sb.append(arr[i]); } return sb.toString(); </DeepExtract> }
csdn_common
positive
438,990
private void OK_ButtonActionPerformed(java.awt.event.ActionEvent evt) { SavedNote = Notes_TextArea.getText(); this.setVisible(false); }
private void OK_ButtonActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> SavedNote = Notes_TextArea.getText(); </DeepExtract> this.setVisible(false); }
JGAAP
positive
438,992
public DeindexingRequestBuilder prepareDeindexing(String indexName, String indexDocId) { DeindexingRequestBuilder builder; try { Constructor<T> constructor = DeindexingRequestBuilder.class.getConstructor(MahutaService.class); builder = constructor.newInstance(service); } catch (InstantiationException | IllegalAccessExc...
public DeindexingRequestBuilder prepareDeindexing(String indexName, String indexDocId) { <DeepExtract> DeindexingRequestBuilder builder; try { Constructor<T> constructor = DeindexingRequestBuilder.class.getConstructor(MahutaService.class); builder = constructor.newInstance(service); } catch (InstantiationException | Il...
Mahuta
positive
438,993
@Test public void testSqlite() throws Exception { String result = null; CDepManifestYml manifest2 = null; try { result = CDepManifestYmlUtils.convertManifestToString(ResolvedManifests.sqlite().manifest.cdepManifestYml); manifest2 = CDepManifestYmlUtils.convertStringToManifest("test-file.yml", result); CDepManifestYmlEq...
@Test public void testSqlite() throws Exception { <DeepExtract> String result = null; CDepManifestYml manifest2 = null; try { result = CDepManifestYmlUtils.convertManifestToString(ResolvedManifests.sqlite().manifest.cdepManifestYml); manifest2 = CDepManifestYmlUtils.convertStringToManifest("test-file.yml", result); CDe...
cdep
positive
438,994
public Criteria andDataFlowTypeBetween(Integer value1, Integer value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "dataFlowType" + " cannot be null"); } criteria.add(new Criterion("data_flow_type between", value1, value2)); return (Criteria) this; }
public Criteria andDataFlowTypeBetween(Integer value1, Integer value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "dataFlowType" + " cannot be null"); } criteria.add(new Criterion("data_flow_type between", value1, value2)); </DeepExtract> return (Criteria)...
data-manage-parent
positive
438,995
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_large_image); ButterKnife.bind(this); Bundle bundle = getIntent().getExtras(); if (bundle != null) { mUrl = bundle.getString(BUNDLE_IMAGE_URL); } if (mUrl == null) { return; } mT...
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_large_image); ButterKnife.bind(this); Bundle bundle = getIntent().getExtras(); if (bundle != null) { mUrl = bundle.getString(BUNDLE_IMAGE_URL); } if (mUrl == null) { return; } <D...
xifan
positive
438,997
public static ContentProviderOperation insert(Context context, long calendarId, CalendarEvent event, @Nullable Contact contact) { builder = ContentProviderOperation.newInsert(CalendarLoader.getBirthdayAdapterUri(context, CalendarContract.Events.CONTENT_URI)); builder.withValue(CalendarContract.Events.CALENDAR_ID, calen...
public static ContentProviderOperation insert(Context context, long calendarId, CalendarEvent event, @Nullable Contact contact) { builder = ContentProviderOperation.newInsert(CalendarLoader.getBirthdayAdapterUri(context, CalendarContract.Events.CONTENT_URI)); builder.withValue(CalendarContract.Events.CALENDAR_ID, calen...
RememBirthday
positive
438,999
public void repair(TopicPartition tp) { log.info("Repairing partition: {}", tp); List<TopicPartition> target = Collections.singletonList(tp); if (target.isEmpty()) { return; } Timer timer = Utils.timer(); store.removePartition(target); if (log.isInfoEnabled()) { log.info("Removed {} partitions in {} ms", target.size(),...
public void repair(TopicPartition tp) { log.info("Repairing partition: {}", tp); List<TopicPartition> target = Collections.singletonList(tp); if (target.isEmpty()) { return; } Timer timer = Utils.timer(); store.removePartition(target); if (log.isInfoEnabled()) { log.info("Removed {} partitions in {} ms", target.size(),...
decaton
positive
439,002
public void addTimeListener(TimeListener timeListener) { this.timeListener.add(timeListener); int newmask = 0; for (int n = 0; n < new int[] { TIME_TAG }.length; n++) { newmask |= 1 << new int[] { TIME_TAG }[n]; } if (this.timeListener.size() == 1) { mask &= ~newmask; } else { mask |= newmask; } maskChanged = true; }
public void addTimeListener(TimeListener timeListener) { this.timeListener.add(timeListener); <DeepExtract> int newmask = 0; for (int n = 0; n < new int[] { TIME_TAG }.length; n++) { newmask |= 1 << new int[] { TIME_TAG }[n]; } if (this.timeListener.size() == 1) { mask &= ~newmask; } else { mask |= newmask; } maskChang...
YADrone
positive
439,003
public Department withNo(String no) { this.no = no == null ? null : no.trim(); return this; }
public Department withNo(String no) { <DeepExtract> this.no = no == null ? null : no.trim(); </DeepExtract> return this; }
mybatis-projects
positive
439,006
@BindingAdapter("sessionDescription") public static void setSessionDescription(TextView textView, @NonNull Session session) { textView.setText(LocaleUtil.getRtlConsideredText(session.description)); Linkify.addLinks(textView, Linkify.ALL); }
@BindingAdapter("sessionDescription") public static void setSessionDescription(TextView textView, @NonNull Session session) { <DeepExtract> textView.setText(LocaleUtil.getRtlConsideredText(session.description)); </DeepExtract> Linkify.addLinks(textView, Linkify.ALL); }
droidkaigi2016
positive
439,007
public static void earlyInit() { Log.infoTag("Ozone", "Hail o7"); Log.debug("Registering module\n"); try { Atom.Manifest.internalRepo.addRepo(InformationCenter.getCurrentJar()); } catch (MalformedURLException t) { WarningHandler.handleMindustry(t); } for (Class<? extends ModuleInterfaced> m : getModule()) { try { if (m...
public static void earlyInit() { Log.infoTag("Ozone", "Hail o7"); Log.debug("Registering module\n"); try { Atom.Manifest.internalRepo.addRepo(InformationCenter.getCurrentJar()); } catch (MalformedURLException t) { WarningHandler.handleMindustry(t); } <DeepExtract> for (Class<? extends ModuleInterfaced> m : getModule())...
Mindustry-Ozone
positive
439,008
@Override public void onAnimationUpdate(ValueAnimator animation) { value.setHeight((int) animation.getAnimatedValue()); if (listener != null) { listener.onValueUpdated(value); } }
@Override public void onAnimationUpdate(ValueAnimator animation) { <DeepExtract> value.setHeight((int) animation.getAnimatedValue()); if (listener != null) { listener.onValueUpdated(value); } </DeepExtract> }
RxBanner
positive
439,009
private void buttonCtorCore(int width, int height) { this.width = Math.max(width, textWidth + 2 * PADH); this.height = Math.max(height, localFont.getSize() + 2 * PADV); border = 1; if (useImages) { switch(imageAlign) { case GAlign.LEFT: imageAlign = imageAlign; imgAlignX = PADH; break; case GAlign.RIGHT: imageAlign = i...
private void buttonCtorCore(int width, int height) { this.width = Math.max(width, textWidth + 2 * PADH); this.height = Math.max(height, localFont.getSize() + 2 * PADV); border = 1; if (useImages) { switch(imageAlign) { case GAlign.LEFT: imageAlign = imageAlign; imgAlignX = PADH; break; case GAlign.RIGHT: imageAlign = i...
Project-Sentry-Gun
positive
439,010
public static Key ID(String value) { if (value instanceof Enum) { value = value.toString(); } Key key = new Key("id"); key.value = value; return key; }
public static Key ID(String value) { <DeepExtract> if (value instanceof Enum) { value = value.toString(); } Key key = new Key("id"); key.value = value; return key; </DeepExtract> }
tropo-webapi-java
positive
439,011
public PointerTargetTree getInheritedHolonyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException { PointerType[] types = new PointerType[3]; types[0] = PointerType.PART_HOLONYM; types[1] = PointerType.MEMBER_HOLONYM; types[2] = PointerType.SUBSTANCE_HOLONYM; PointerType[] searchTypes = new Pointer...
public PointerTargetTree getInheritedHolonyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException { PointerType[] types = new PointerType[3]; types[0] = PointerType.PART_HOLONYM; types[1] = PointerType.MEMBER_HOLONYM; types[2] = PointerType.SUBSTANCE_HOLONYM; <DeepExtract> PointerType[] searchTypes...
WordSimilarity
positive
439,012
public void insertvariation() { if (Pos.parentPos() == null) return; ListElement la = Pos.node().actions(); Action a; clearsend(); while (la != null) { a = (Action) la.content(); if (a.type().equals("C")) { if (GF.getComment().equals("")) Pos.node().removeaction(la); else a.arguments().content(GF.getComment()); return;...
public void insertvariation() { <DeepExtract> </DeepExtract> if (Pos.parentPos() == null) <DeepExtract> </DeepExtract> return; <DeepExtract> </DeepExtract> ListElement la = Pos.node().actions(); <DeepExtract> </DeepExtract> Action a; <DeepExtract> </DeepExtract> clearsend(); <DeepExtract> </DeepExtract> while (la != nu...
DragonGoApp
positive
439,013
public void postRetryRegister(@NonNull final String providerName) { OPFLog.logMethod(providerName); final long when = System.currentTimeMillis() + getTryDelay(providerName, REGISTER); OPFLog.d("Post retry %s provider '%s' at %s", REGISTER, providerName, SimpleDateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateForma...
public void postRetryRegister(@NonNull final String providerName) { OPFLog.logMethod(providerName); <DeepExtract> final long when = System.currentTimeMillis() + getTryDelay(providerName, REGISTER); OPFLog.d("Post retry %s provider '%s' at %s", REGISTER, providerName, SimpleDateFormat.getDateTimeInstance(DateFormat.DEFA...
OPFPush
positive
439,014
@Test(expected = org.apache.hadoop.fs.swift.exceptions.SwiftConfigurationException.class) public void testEmptyPassword() throws Exception { final Configuration configuration = new Configuration(); configuration.set(SWIFT_SERVICE_PREFIX + SERVICE + DOT_AUTH_URL, "http://localhost:8080"); configuration.set(SWIFT_SERVICE...
@Test(expected = org.apache.hadoop.fs.swift.exceptions.SwiftConfigurationException.class) public void testEmptyPassword() throws Exception { final Configuration configuration = new Configuration(); configuration.set(SWIFT_SERVICE_PREFIX + SERVICE + DOT_AUTH_URL, "http://localhost:8080"); configuration.set(SWIFT_SERVICE...
sahara-extra
positive
439,015
public void itemStateChanged(java.awt.event.ItemEvent evt) { if (cbAlign.getSelectedItem().toString().equalsIgnoreCase(Bundle.getBundle().getString("left"))) { previewPanel1.setAlign(0); } else if (cbAlign.getSelectedItem().toString().equalsIgnoreCase(Bundle.getBundle().getString("center"))) { previewPanel1.setAlign(1)...
public void itemStateChanged(java.awt.event.ItemEvent evt) { <DeepExtract> if (cbAlign.getSelectedItem().toString().equalsIgnoreCase(Bundle.getBundle().getString("left"))) { previewPanel1.setAlign(0); } else if (cbAlign.getSelectedItem().toString().equalsIgnoreCase(Bundle.getBundle().getString("center"))) { previewPane...
aCCinaPDF
positive
439,017
private void _stringListPojoRoundtrip(ObjectMapper mapper, boolean shouldBeNull) throws Exception { ListPojo listPojo = new ListPojo(); this.list = asList(TEST_DATA); String xml = mapper.writeValueAsString(listPojo); assertNotNull(xml); ListPojo result = mapper.readValue(xml, ListPojo.class); assertEquals(4, result.lis...
private void _stringListPojoRoundtrip(ObjectMapper mapper, boolean shouldBeNull) throws Exception { ListPojo listPojo = new ListPojo(); <DeepExtract> this.list = asList(TEST_DATA); </DeepExtract> String xml = mapper.writeValueAsString(listPojo); assertNotNull(xml); ListPojo result = mapper.readValue(xml, ListPojo.class...
jackson-dataformat-xml
positive
439,018
@Override public void onPause() { m_sensorManager.unregisterListener(this); super.onPause(); }
@Override public void onPause() { <DeepExtract> m_sensorManager.unregisterListener(this); </DeepExtract> super.onPause(); }
Android-Examples
positive
439,019
@Test public void testClearCache() throws IOException, ExecutionException, InterruptedException { this.loadData(); for (int i = 0; i < 20; i++) { this.runQuery(); } HttpResponse response = httpClient().method("GET").path("/_filter_join/cache/stats").execute(); assertThat(response.getStatusCode(), equalTo(RestStatus.OK....
@Test public void testClearCache() throws IOException, ExecutionException, InterruptedException { <DeepExtract> this.loadData(); for (int i = 0; i < 20; i++) { this.runQuery(); } </DeepExtract> HttpResponse response = httpClient().method("GET").path("/_filter_join/cache/stats").execute(); assertThat(response.getStatusC...
siren-join
positive
439,020
private JsonWriter end(char m, char c) { if (this.mode != m) { throw new JsonException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } if (this.top <= 0) { throw new JsonException("Nesting error."); } char m = this.stack[this.top - 1] == null ? 'a' : 'k'; if (m != m) { throw new JsonException("Nesting err...
private JsonWriter end(char m, char c) { if (this.mode != m) { throw new JsonException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } <DeepExtract> if (this.top <= 0) { throw new JsonException("Nesting error."); } char m = this.stack[this.top - 1] == null ? 'a' : 'k'; if (m != m) { throw new JsonExceptio...
fHalo
positive
439,021
public void mousePressed() { super.mousePressed(); if (mouseButton == LEFT) { movements.add(new Movement()); } if (mouseButton == RIGHT) { drawDeleteCircle(mouseX, mouseY); removeLinesCloseTo(mouseX, mouseY); } else if (mouseButton == LEFT) { makeLine(); } }
public void mousePressed() { super.mousePressed(); if (mouseButton == LEFT) { movements.add(new Movement()); } <DeepExtract> if (mouseButton == RIGHT) { drawDeleteCircle(mouseX, mouseY); removeLinesCloseTo(mouseX, mouseY); } else if (mouseButton == LEFT) { makeLine(); } </DeepExtract> }
Sketches
positive
439,022
public Criteria andEmotionvalueLessThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "emotionvalue" + " cannot be null"); } criteria.add(new Criterion("emotionValue <=", value)); return (Criteria) this; }
public Criteria andEmotionvalueLessThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "emotionvalue" + " cannot be null"); } criteria.add(new Criterion("emotionValue <=", value)); </DeepExtract> return (Criteria) this; }
music
positive
439,024
public static void assertZeroMemory() { assertEquals(FineIO.getCurrentMemorySize(), 0); assertEquals(FineIO.getCurrentReadMemorySize(), 0); assertEquals(FineIO.getCurrentWriteMemorySize(), 0); assertEquals(FineIO.getReadWaitCount(), 0); assertEquals(FineIO.getWriteWaitCount(), 0); try { Field edit = CacheManager.class....
public static void assertZeroMemory() { assertEquals(FineIO.getCurrentMemorySize(), 0); assertEquals(FineIO.getCurrentReadMemorySize(), 0); assertEquals(FineIO.getCurrentWriteMemorySize(), 0); assertEquals(FineIO.getReadWaitCount(), 0); assertEquals(FineIO.getWriteWaitCount(), 0); try { Field edit = CacheManager.class....
fineio
positive
439,025
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { String userId = userCookieGenerator.readCookieValue(request); if (userId == null) { return; } if (!userNotFound(userId)) { userCookieGenerator.removeCookie(response); return; } SecurityContext.setCurren...
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { <DeepExtract> String userId = userCookieGenerator.readCookieValue(request); if (userId == null) { return; } if (!userNotFound(userId)) { userCookieGenerator.removeCookie(response); return; } SecurityCon...
spring-social-samples
positive
439,026
private void download() throws IOException { boolean is32 = "32".equals(System.getProperty("sun.arch.data.model")); final String os = System.getProperty("os.name", "").toLowerCase(); if (os.contains("windows")) { fileName = is32 ? "win32" : "win64"; } else if (os.contains("mac")) { fileName = is32 ? "mac" : "mac64"; } ...
private void download() throws IOException { boolean is32 = "32".equals(System.getProperty("sun.arch.data.model")); final String os = System.getProperty("os.name", "").toLowerCase(); if (os.contains("windows")) { fileName = is32 ? "win32" : "win64"; } else if (os.contains("mac")) { fileName = is32 ? "mac" : "mac64"; } ...
JWebAssembly
positive
439,027
public void updateSecondPerformanceEval(UpdateRaterPerformanceEvalCommand command) { if (!personalEval.checkSecondRater(command.getRaterId())) { throw new YouAreNotSecondRaterException(); } if (!personalEval.isFirstTotalEvalDone()) { throw new FirstEvalNotYetFinishedException(); } personalEval.applyEvent(new SecondPerf...
public void updateSecondPerformanceEval(UpdateRaterPerformanceEvalCommand command) { if (!personalEval.checkSecondRater(command.getRaterId())) { throw new YouAreNotSecondRaterException(); } <DeepExtract> if (!personalEval.isFirstTotalEvalDone()) { throw new FirstEvalNotYetFinishedException(); } </DeepExtract> personalE...
evaluation
positive
439,028
@Override protected Object doInBackground() throws Exception { MinioClient minioClient = MinioClient.builder().endpoint("https://play.min.io").credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG").build(); File file = new File(defaultFileName); try (BufferedInputStream bis = new BufferedInputS...
@Override protected Object doInBackground() throws Exception { <DeepExtract> MinioClient minioClient = MinioClient.builder().endpoint("https://play.min.io").credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG").build(); File file = new File(defaultFileName); try (BufferedInputStream bis = new ...
minio-java
positive
439,030
private String jniConfigArguments() { String filePaths = StreamSupport.stream(jniConfigs.spliterator(), false).map(File::toPath).filter(Files::exists).map(Path::toString).collect(Collectors.joining(",")); if (filePaths.isEmpty()) { return ""; } return String.format("-H:%s=%s", "JNIConfigurationFiles", filePaths); }
private String jniConfigArguments() { <DeepExtract> String filePaths = StreamSupport.stream(jniConfigs.spliterator(), false).map(File::toPath).filter(Files::exists).map(Path::toString).collect(Collectors.joining(",")); if (filePaths.isEmpty()) { return ""; } return String.format("-H:%s=%s", "JNIConfigurationFiles", fil...
graalvm-native-image-plugin
positive
439,032
private void commitChanges(PayloadEditor payloadEditor) { JsonElement json = payloadEditor.getJson(); try { logger.info("Committing changes to {}", view.getUniqueIdFor(combinedField)); controller.getModel().editField(combinedField, ReconstructField.setRawValue(combinedField.getId(), json)); } catch (Exception e) { logg...
private void commitChanges(PayloadEditor payloadEditor) { JsonElement json = payloadEditor.getJson(); <DeepExtract> try { logger.info("Committing changes to {}", view.getUniqueIdFor(combinedField)); controller.getModel().editField(combinedField, ReconstructField.setRawValue(combinedField.getId(), json)); } catch (Excep...
trex-packet-editor
positive
439,033
public List<String> popClobs() { int size = getInt(); List<String> strings = new ArrayList<>(size); while (size-- > 0) { strings.add(getClob()); } return strings; }
public List<String> popClobs() { <DeepExtract> int size = getInt(); List<String> strings = new ArrayList<>(size); while (size-- > 0) { strings.add(getClob()); } return strings; </DeepExtract> }
jzmq-api
positive
439,034
@Test public void zrem() { rc.del(a("myzset")); eq(1, rc.zadd(a("myzset", "1", "one")).get()); eq(1, rc.zadd(a("myzset", "2", "two")).get()); eq(1, rc.zadd(a("myzset", "3", "three")).get()); eq(1, rc.zrem_("myzset", "two").get()); eq(a("one", "1", "three", "3"), rc.zrange("myzset", "0", "-1", WITHSCORES).get()); }
@Test public void zrem() { rc.del(a("myzset")); eq(1, rc.zadd(a("myzset", "1", "one")).get()); eq(1, rc.zadd(a("myzset", "2", "two")).get()); eq(1, rc.zadd(a("myzset", "3", "three")).get()); eq(1, rc.zrem_("myzset", "two").get()); <DeepExtract> eq(a("one", "1", "three", "3"), rc.zrange("myzset", "0", "-1", WITHSCORES)....
redis-protocol
positive
439,035
@Override protected void showContent() { baseSetContentView(R.layout.activity_selected_course); List<SelectedCourseBean> selectedCourseBeans = moreDate.getSelectedCourseBeans(); spinner = findViewById(R.id.spinner_course_term); rv = findViewById(R.id.rv_selected_course); rv.setLayoutManager(new LinearLayoutManager(this...
@Override protected void showContent() { baseSetContentView(R.layout.activity_selected_course); List<SelectedCourseBean> selectedCourseBeans = moreDate.getSelectedCourseBeans(); spinner = findViewById(R.id.spinner_course_term); rv = findViewById(R.id.rv_selected_course); rv.setLayoutManager(new LinearLayoutManager(this...
GuetClassTable
positive
439,038
@Override public final String getToStringPrefix(Class<?> pojoClass) { StringBuilder builder = new StringBuilder(); builder.append(pojoClass.getSimpleName()).append('{'); return builder.toString(); }
@Override public final String getToStringPrefix(Class<?> pojoClass) { StringBuilder builder = new StringBuilder(); <DeepExtract> builder.append(pojoClass.getSimpleName()).append('{'); </DeepExtract> return builder.toString(); }
pojomatic
positive
439,041
@Before public void setUp() { connector = new SmartIdConnectorSpy(); AuthenticationSessionResponse response = new AuthenticationSessionResponse(); response.setSessionID("97f5058e-e308-4c83-ac14-7712b0eb9d86"); return response; SessionSignature signature = new SessionSignature(); signature.setValue("c2FtcGxlIHNpZ25hdHVy...
@Before public void setUp() { connector = new SmartIdConnectorSpy(); AuthenticationSessionResponse response = new AuthenticationSessionResponse(); response.setSessionID("97f5058e-e308-4c83-ac14-7712b0eb9d86"); return response; <DeepExtract> SessionSignature signature = new SessionSignature(); signature.setValue("c2FtcG...
smart-id-java-client
positive
439,042
public static void load(Page mainPage) { int clientWidth = Window.getClientWidth(); if (Utils.isDesktop()) { Document.get().getDocumentElement().setClassName("HVGA"); } else if (clientWidth < 320) { Document.get().getDocumentElement().setClassName("QVGA"); } else if (clientWidth < 480) { Document.get().getDocumentEleme...
public static void load(Page mainPage) { <DeepExtract> int clientWidth = Window.getClientWidth(); if (Utils.isDesktop()) { Document.get().getDocumentElement().setClassName("HVGA"); } else if (clientWidth < 320) { Document.get().getDocumentElement().setClassName("QVGA"); } else if (clientWidth < 480) { Document.get().ge...
GwtMobile-UI
positive
439,044
@Override public Collection<ResourceLocation> getAllResourceLocations(ResourcePackType type, String namespaceIn, String pathIn, int maxDepthIn, Predicate<String> filterIn) { List<ResourceLocation> result = new ArrayList<>(); if (0 >= maxDepthIn) { return; } try { if (!Files.exists(path.resolve(type.getDirectoryName() +...
@Override public Collection<ResourceLocation> getAllResourceLocations(ResourcePackType type, String namespaceIn, String pathIn, int maxDepthIn, Predicate<String> filterIn) { List<ResourceLocation> result = new ArrayList<>(); <DeepExtract> if (0 >= maxDepthIn) { return; } try { if (!Files.exists(path.resolve(type.getDir...
MasterfulMachinery
positive
439,046
@PostConstruct public void init() throws ConfigurationException { if (null == null) { null = new Hashtable<>(); } methodsToLog = parseProperty(null, METHODS_TO_LOG, DEFAULT_METHODS_TO_LOG, methods -> ImmutableSet.copyOf(Arrays.asList(methods.split(",")).stream().peek(TSDRRestconfCollectorConfig::validateMethod).iterato...
@PostConstruct public void init() throws ConfigurationException { <DeepExtract> if (null == null) { null = new Hashtable<>(); } methodsToLog = parseProperty(null, METHODS_TO_LOG, DEFAULT_METHODS_TO_LOG, methods -> ImmutableSet.copyOf(Arrays.asList(methods.split(",")).stream().peek(TSDRRestconfCollectorConfig::validateM...
tsdr
positive
439,047
public static void agentmain(String agentArgs, Instrumentation instrumentation) { try { AgentConfiguration configuration = AgentConfigurationFactory.create(); Logger.setCurrentLogLevel(configuration.getLogLevel()); printBanner(configuration); PluginManager pluginManager = new PluginManager(configuration.getPluginInclud...
public static void agentmain(String agentArgs, Instrumentation instrumentation) { <DeepExtract> try { AgentConfiguration configuration = AgentConfigurationFactory.create(); Logger.setCurrentLogLevel(configuration.getLogLevel()); printBanner(configuration); PluginManager pluginManager = new PluginManager(configuration.g...
james
positive
439,048
public static <T> T convertObjectNode2Object(ObjectNode objectNode, Class<T> cls) { if (null == objectNode) { return null; } T object = null; try { object = objectMapper.convertValue(objectNode, cls); } catch (IllegalArgumentException e) { log.error("convert value failed " + e.getMessage()); object = null; } return obj...
public static <T> T convertObjectNode2Object(ObjectNode objectNode, Class<T> cls) { if (null == objectNode) { return null; } T object = null; <DeepExtract> try { object = objectMapper.convertValue(objectNode, cls); } catch (IllegalArgumentException e) { log.error("convert value failed " + e.getMessage()); object = null...
huaweicloud-iot-device-sdk-java
positive
439,049
@Test public void testGetLinkedArtifactWithExistingLinkedArtifactButNotDirectlyDefinedInDb() { service = new RenamingService(configuration, "https://svn-testrepository.at", "18.0.300", "18.5.300"); final Path source = Paths.get("www/direct/java/plugins/org.opin.framework.direct/newFile.txt"); final Path expected = Path...
@Test public void testGetLinkedArtifactWithExistingLinkedArtifactButNotDirectlyDefinedInDb() { <DeepExtract> service = new RenamingService(configuration, "https://svn-testrepository.at", "18.0.300", "18.5.300"); </DeepExtract> final Path source = Paths.get("www/direct/java/plugins/org.opin.framework.direct/newFile.txt"...
MergeProcessor
positive
439,051
public Criteria andUserParm2NotBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "userParm2" + " cannot be null"); } criteria.add(new Criterion("USER_PARM2 not between", value1, value2)); return (Criteria) this; }
public Criteria andUserParm2NotBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "userParm2" + " cannot be null"); } criteria.add(new Criterion("USER_PARM2 not between", value1, value2)); </DeepExtract> return (Criteria) this...
console
positive
439,052
@NonNull public Query setFilters(String filters) { return (Query) super.set(KEY_FILTERS, filters); }
@NonNull public Query setFilters(String filters) { <DeepExtract> return (Query) super.set(KEY_FILTERS, filters); </DeepExtract> }
algoliasearch-client-android
positive
439,055
Integer addEntity(Object value) { Integer key = keyGenerator.getNextKey(); entities.put(key, value); EntityEvent event = new EntityEvent(key, value); for (EntityListener listener : listeners) { listener.entityAdded(event); } return key; }
Integer addEntity(Object value) { Integer key = keyGenerator.getNextKey(); entities.put(key, value); <DeepExtract> EntityEvent event = new EntityEvent(key, value); for (EntityListener listener : listeners) { listener.entityAdded(event); } </DeepExtract> return key; }
jdpe2
positive
439,058
@Deprecated public Savepoint save(String name) throws SQLException { return getConnection().setSavepoint(name); }
@Deprecated public Savepoint save(String name) throws SQLException { <DeepExtract> return getConnection().setSavepoint(name); </DeepExtract> }
jorm
positive
439,060
@Test public void testUnquoted() throws Exception { try { GitBadCommandFilter filter = new GitBadCommandFilter(); filter.filterOrThrow("git-upload-pack bob"); fail("didn't throw"); } catch (BadCommandException e) { } }
@Test public void testUnquoted() throws Exception { <DeepExtract> try { GitBadCommandFilter filter = new GitBadCommandFilter(); filter.filterOrThrow("git-upload-pack bob"); fail("didn't throw"); } catch (BadCommandException e) { } </DeepExtract> }
scumd
positive
439,061
@Test(expected = IllegalArgumentException.class) public void testBuilderWithInvalidRange() { return Ipv4.of(Long.parseLong(ip1)); }
@Test(expected = IllegalArgumentException.class) public void testBuilderWithInvalidRange() { <DeepExtract> return Ipv4.of(Long.parseLong(ip1)); </DeepExtract> }
commons-ip-math
positive
439,063
@Override protected void finishCreateView(Bundle state) { mVer = getArguments().getInt("ver"); mTitle = getArguments().getString("title"); mToolbar.setTitle(mTitle); mToolbar.setNavigationIcon(R.drawable.ic_action_navigation_arrow_back_inverted); mToolbar.setNavigationOnClickListener(v -> getActivity().finish()); isPre...
@Override protected void finishCreateView(Bundle state) { mVer = getArguments().getInt("ver"); mTitle = getArguments().getString("title"); mToolbar.setTitle(mTitle); mToolbar.setNavigationIcon(R.drawable.ic_action_navigation_arrow_back_inverted); mToolbar.setNavigationOnClickListener(v -> getActivity().finish()); isPre...
honglv-no
positive
439,064
@Override public int drawString(int x, int y, String text, Color color) { String key = text + color.getRGB() + bold + fontName; int textwidth = getStringWidthNonScaled(text); int textheight = getStringHeightNonScaled(text); if (!memorysaving && textureStore.containsKey(key)) { textTexture = textureStore.get(key); } els...
@Override public int drawString(int x, int y, String text, Color color) { String key = text + color.getRGB() + bold + fontName; int textwidth = getStringWidthNonScaled(text); int textheight = getStringHeightNonScaled(text); if (!memorysaving && textureStore.containsKey(key)) { textTexture = textureStore.get(key); } els...
EMC
positive
439,065
@Test public void testSchemaXsiType4() throws Exception { QuickTestConfiguration.setXsdLocation("./data/schema/xsi-type4.xsd"); QuickTestConfiguration.setXmlLocation("./data/schema/xsi-type4.xml"); QuickTestConfiguration.setExiLocation("./out/schema/xsi-type4.exi"); FidelityOptions noValidOptions = FidelityOptions.crea...
@Test public void testSchemaXsiType4() throws Exception { <DeepExtract> QuickTestConfiguration.setXsdLocation("./data/schema/xsi-type4.xsd"); QuickTestConfiguration.setXmlLocation("./data/schema/xsi-type4.xml"); QuickTestConfiguration.setExiLocation("./out/schema/xsi-type4.exi"); </DeepExtract> FidelityOptions noValidO...
exificient
positive
439,066
public Criteria andAppDescNotIn(List<String> values) { if (values == null) { throw new RuntimeException("Value for " + "appDesc" + " cannot be null"); } criteria.add(new Criterion("app_desc not in", values)); return (Criteria) this; }
public Criteria andAppDescNotIn(List<String> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "appDesc" + " cannot be null"); } criteria.add(new Criterion("app_desc not in", values)); </DeepExtract> return (Criteria) this; }
lightconf
positive
439,069
public String addObserver(int groupId, String signUserId, String nodeId) { if (!isValidNodeID(nodeId)) { return PrecompiledRetCode.CODE_INVALID_NODEID.toString(); } List<String> observerList = web3ApiService.getObserverList(groupId); if (observerList.contains(nodeId)) { return ConstantCode.ALREADY_EXISTS_IN_OBSERVER_LI...
public String addObserver(int groupId, String signUserId, String nodeId) { if (!isValidNodeID(nodeId)) { return PrecompiledRetCode.CODE_INVALID_NODEID.toString(); } List<String> observerList = web3ApiService.getObserverList(groupId); if (observerList.contains(nodeId)) { return ConstantCode.ALREADY_EXISTS_IN_OBSERVER_LI...
WeBASE-Front
positive
439,074
public static void main(String[] args) { int[] array = { 5, 3, 2, 4, 9, 8, 7, 1, 6 }; System.out.println("---------- bubbleSort1 ----------"); print(Arrays.copyOf(array, array.length)); for (int j = 0; j < Arrays.copyOf(array, array.length).length - 1; j++) { if (Arrays.copyOf(array, array.length)[j] > Arrays.copyOf(ar...
public static void main(String[] args) { int[] array = { 5, 3, 2, 4, 9, 8, 7, 1, 6 }; System.out.println("---------- bubbleSort1 ----------"); print(Arrays.copyOf(array, array.length)); for (int j = 0; j < Arrays.copyOf(array, array.length).length - 1; j++) { if (Arrays.copyOf(array, array.length)[j] > Arrays.copyOf(ar...
ProjectStudy
positive
439,075
public static LocalTime ofSecondOfDay(long secondOfDay, int nanoOfSecond) { SECOND_OF_DAY.checkValidValue(secondOfDay); NANO_OF_SECOND.checkValidValue(nanoOfSecond); int hours = (int) (secondOfDay / SECONDS_PER_HOUR); secondOfDay -= hours * SECONDS_PER_HOUR; int minutes = (int) (secondOfDay / SECONDS_PER_MINUTE); secon...
public static LocalTime ofSecondOfDay(long secondOfDay, int nanoOfSecond) { SECOND_OF_DAY.checkValidValue(secondOfDay); NANO_OF_SECOND.checkValidValue(nanoOfSecond); int hours = (int) (secondOfDay / SECONDS_PER_HOUR); secondOfDay -= hours * SECONDS_PER_HOUR; int minutes = (int) (secondOfDay / SECONDS_PER_MINUTE); secon...
gwt-time
positive
439,080
public MessageObject lose() throws RemoteException { serverInterface.performMove(new MessageObject("", clientId, "", new MessageObject("", clientId, "", "LOSE"))); MessageObject response = emptyMove(); return response.getMyMessage(); }
public MessageObject lose() throws RemoteException { <DeepExtract> serverInterface.performMove(new MessageObject("", clientId, "", new MessageObject("", clientId, "", "LOSE"))); MessageObject response = emptyMove(); return response.getMyMessage(); </DeepExtract> }
VI_semester
positive
439,081
public char extract_wchar() { if (!isInitialized) throw wrapper.extractNotInitialized(); int tc = realType().kind().value(); if (tc != TCKind._tk_wchar) { String tcName = getTCKindName(tc); String expectedName = getTCKindName(TCKind._tk_wchar); throw wrapper.extractWrongType(expectedName, tcName); } return (char) value...
public char extract_wchar() { <DeepExtract> if (!isInitialized) throw wrapper.extractNotInitialized(); int tc = realType().kind().value(); if (tc != TCKind._tk_wchar) { String tcName = getTCKindName(tc); String expectedName = getTCKindName(TCKind._tk_wchar); throw wrapper.extractWrongType(expectedName, tcName); } </Dee...
javancss
positive
439,082
public Property<T> defaults(Object defaultValue, String... versions) { if (versionDefaults == null) versionDefaults = new Hashtable<String, Object>(1); if (versions == null || versions.length == 0) versions = CurrentArray; for (int i = 0; i < versions.length; i++) versionDefaults.put(versions[i], defaultValue); return ...
public Property<T> defaults(Object defaultValue, String... versions) { <DeepExtract> if (versionDefaults == null) versionDefaults = new Hashtable<String, Object>(1); if (versions == null || versions.length == 0) versions = CurrentArray; for (int i = 0; i < versions.length; i++) versionDefaults.put(versions[i], defaultV...
SmartMoving
positive
439,084
@Override public void onClick(View view) { Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); } }
@Override public void onClick(View view) { <DeepExtract> Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); } </DeepExtract> }
ssuet-android-adv-mar17
positive
439,085
@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2022-02-21T15:37:49.803+08:00", comments = "Source Table: uds_job_source") default int updateByPrimaryKeySelective(UdsJobSource record) { return MyBatis3Utils.update(this::update, udsJobSource, c -> c.set(signals).equalToWhenPresent(record::getSig...
@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2022-02-21T15:37:49.803+08:00", comments = "Source Table: uds_job_source") default int updateByPrimaryKeySelective(UdsJobSource record) { <DeepExtract> return MyBatis3Utils.update(this::update, udsJobSource, c -> c.set(signals).equalToWhenPresent(...
harrier
positive
439,087
public static String getTodayZeroClock() { DateTime dateTime = new DateTime(new Date()); return dateTime.toString(COMMON_DATE_TIME_FORMAT); }
public static String getTodayZeroClock() { <DeepExtract> DateTime dateTime = new DateTime(new Date()); return dateTime.toString(COMMON_DATE_TIME_FORMAT); </DeepExtract> }
liteflow
positive
439,088
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!SelectionSpec.getInstance().hasInited) { setResult(RESULT_CANCELED); finish(); return; } setContentView(R.layout.activity_media_preview); if (Platform.hasKitKat()) { getWindow().addFlags(WindowManager.Layou...
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!SelectionSpec.getInstance().hasInited) { setResult(RESULT_CANCELED); finish(); return; } setContentView(R.layout.activity_media_preview); if (Platform.hasKitKat()) { getWindow().addFlags(WindowManager.Layou...
Box
positive
439,090
public static Bitmap decodeSampledBitmap(File file, int reqWidth, int reqHeight) throws IOException { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(file.getAbsolutePath(), options); final int height = options.outHeight; final int width = options...
public static Bitmap decodeSampledBitmap(File file, int reqWidth, int reqHeight) throws IOException { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(file.getAbsolutePath(), options); <DeepExtract> final int height = options.outHeight; final int w...
HockeySDK-Android
positive
439,092
protected void showError(String message) { if (true) { Log.w(TAG, message); } else { Log.i(TAG, message); } Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show(); }
protected void showError(String message) { <DeepExtract> if (true) { Log.w(TAG, message); } else { Log.i(TAG, message); } Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show(); </DeepExtract> }
android-AutofillFramework
positive
439,094
private Map<String, CellStyle> createStyles(Workbook wb) { styles = new HashMap<String, CellStyle>(); DataFormat df = wb.createDataFormat(); Font normalFont = wb.createFont(); normalFont.setFontHeightInPoints((short) 10); Font boldFont = wb.createFont(); boldFont.setFontHeightInPoints((short) 10); boldFont.setBoldweigh...
private Map<String, CellStyle> createStyles(Workbook wb) { styles = new HashMap<String, CellStyle>(); DataFormat df = wb.createDataFormat(); Font normalFont = wb.createFont(); normalFont.setFontHeightInPoints((short) 10); Font boldFont = wb.createFont(); boldFont.setFontHeightInPoints((short) 10); boldFont.setBoldweigh...
Spring-Web-MVC
positive
439,095