before stringlengths 12 3.21M | after stringlengths 41 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
public Criteria andUserIdEqualTo(Long value) {
if (value == null) {
throw new RuntimeException("Value for " + "userId" + " cannot be null");
}
criteria.add(new Criterion("user_id =", value));
return (Criteria) this;
} | public Criteria andUserIdEqualTo(Long value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "userId" + " cannot be null");
}
criteria.add(new Criterion("user_id =", value));
</DeepExtract>
return (Criteria) this;
} | webim | positive | 1,520 |
@Override
public void refreshSuccess() {
mHeaderView.stopNestedAnim();
mFooterView.stopNestedAnim();
return super.stopNestedAnim();
mHeaderView.setState(IState.STATE_SUCCESS);
mFooterView.setState(IState.STATE_NONE);
} | @Override
public void refreshSuccess() {
<DeepExtract>
mHeaderView.stopNestedAnim();
mFooterView.stopNestedAnim();
return super.stopNestedAnim();
</DeepExtract>
mHeaderView.setState(IState.STATE_SUCCESS);
mFooterView.setState(IState.STATE_NONE);
} | PullLayout | positive | 1,521 |
@Override
public void storeFile(String path, InputStream is, long size) throws IOException {
if (path.charAt(0) == '/') {
path = path.substring(1);
}
return path;
S3Object fileObject = new S3Object(path);
fileObject.setDataInputStream(is);
if (size != -1) {
fileObject.setContentLength(size);
}
try {
service.putObject(b... | @Override
public void storeFile(String path, InputStream is, long size) throws IOException {
<DeepExtract>
if (path.charAt(0) == '/') {
path = path.substring(1);
}
return path;
</DeepExtract>
S3Object fileObject = new S3Object(path);
fileObject.setDataInputStream(is);
if (size != -1) {
fileObject.setContentLength(size)... | computoser | positive | 1,522 |
public boolean init(final Context context, final PreferenceScreen prefScreen) {
mImm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
final List<InputMethodInfo> imis = mImm.getInputMethodList();
for (int i = 0; i < imis.size(); ++i) {
final InputMethodInfo imi = imis.get(i);
if (imis.get(... | public boolean init(final Context context, final PreferenceScreen prefScreen) {
mImm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
final List<InputMethodInfo> imis = mImm.getInputMethodList();
for (int i = 0; i < imis.size(); ++i) {
final InputMethodInfo imi = imis.get(i);
if (imis.get(... | Android-Keyboard | positive | 1,523 |
public static void main(String[] args) {
E.checkArgument(args.length == 1, "args: file");
String input = args[0];
LOG.info("Prepare to convert mapping file {}", input);
File file = FileUtils.getFile(input);
if (!file.exists() || !file.isFile()) {
LOG.error("The file '{}' doesn't exists or not a file", input);
throw new... | public static void main(String[] args) {
E.checkArgument(args.length == 1, "args: file");
String input = args[0];
LOG.info("Prepare to convert mapping file {}", input);
File file = FileUtils.getFile(input);
if (!file.exists() || !file.isFile()) {
LOG.error("The file '{}' doesn't exists or not a file", input);
throw new... | hugegraph-loader | positive | 1,524 |
public com.google.assistant.embedded.v1alpha2.AudioOutConfigOrBuilder getAudioOutConfigOrBuilder() {
return audioOutConfig_ == null ? com.google.assistant.embedded.v1alpha2.AudioOutConfig.getDefaultInstance() : audioOutConfig_;
} | public com.google.assistant.embedded.v1alpha2.AudioOutConfigOrBuilder getAudioOutConfigOrBuilder() {
<DeepExtract>
return audioOutConfig_ == null ? com.google.assistant.embedded.v1alpha2.AudioOutConfig.getDefaultInstance() : audioOutConfig_;
</DeepExtract>
} | google-assistant-java-demo | positive | 1,525 |
void validateDirectionTo(DirectionPoint point) {
to = point;
fragment.showSelectedDirectionTo(point, venueLanguage);
if (from != null && to != null) {
startDirection();
}
} | void validateDirectionTo(DirectionPoint point) {
to = point;
fragment.showSelectedDirectionTo(point, venueLanguage);
<DeepExtract>
if (from != null && to != null) {
startDirection();
}
</DeepExtract>
} | mapwize-ui-android | positive | 1,526 |
public void listCleared() {
currentAlbums.clear();
mode = Mode.EMPTY;
CurrentListState state = getState();
for (CurrentListListener listener : listeners) {
listener.stateChanged(state);
}
allowAlbumReload = true;
} | public void listCleared() {
currentAlbums.clear();
mode = Mode.EMPTY;
<DeepExtract>
CurrentListState state = getState();
for (CurrentListListener listener : listeners) {
listener.stateChanged(state);
}
allowAlbumReload = true;
</DeepExtract>
} | HypnosMusicPlayer | positive | 1,528 |
public Book getBook() {
if (book != null) {
return book;
}
try {
URL bookUrl = FacesContext.getCurrentInstance().getExternalContext().getResource("/WEB-INF/books/application_for_leave.xlsx");
book = Importers.getImporter().imports(bookUrl, "app4leave");
} catch (Exception e) {
e.printStackTrace();
return null;
}
Sheet ... | public Book getBook() {
if (book != null) {
return book;
}
try {
URL bookUrl = FacesContext.getCurrentInstance().getExternalContext().getResource("/WEB-INF/books/application_for_leave.xlsx");
book = Importers.getImporter().imports(bookUrl, "app4leave");
} catch (Exception e) {
e.printStackTrace();
return null;
}
Sheet ... | dev-ref | positive | 1,529 |
public final void setDoubleTapZoomDpi(int dpi) {
DisplayMetrics metrics = getResources().getDisplayMetrics();
float averageDpi = (metrics.xdpi + metrics.ydpi) / 2;
this.doubleTapZoomScale = averageDpi / dpi;
} | public final void setDoubleTapZoomDpi(int dpi) {
DisplayMetrics metrics = getResources().getDisplayMetrics();
float averageDpi = (metrics.xdpi + metrics.ydpi) / 2;
<DeepExtract>
this.doubleTapZoomScale = averageDpi / dpi;
</DeepExtract>
} | SurveyOnUCMap | positive | 1,530 |
public Invitation toInvitation() {
try {
T instance = clazz.newInstance();
this.copyTo(instance);
return instance;
} catch (Exception e) {
return null;
}
} | public Invitation toInvitation() {
<DeepExtract>
try {
T instance = clazz.newInstance();
this.copyTo(instance);
return instance;
} catch (Exception e) {
return null;
}
</DeepExtract>
} | firestream-android | positive | 1,531 |
private boolean existsLegacyTqExe(Path basePath) {
return Paths.get(basePath.toString(), DATABASE_DIR).toFile().isDirectory() && Paths.get(basePath.toString(), "Titan Quest.exe").toFile().exists();
} | private boolean existsLegacyTqExe(Path basePath) {
<DeepExtract>
return Paths.get(basePath.toString(), DATABASE_DIR).toFile().isDirectory() && Paths.get(basePath.toString(), "Titan Quest.exe").toFile().exists();
</DeepExtract>
} | tqrespec | positive | 1,532 |
public static <T> T post(String server, Object requestParams, ParameterizedTypeReference<T> responseType) {
String paramJson = null;
if (requestParams != null) {
paramJson = JsonUtils.toJsonString(requestParams);
}
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<S... | public static <T> T post(String server, Object requestParams, ParameterizedTypeReference<T> responseType) {
<DeepExtract>
String paramJson = null;
if (requestParams != null) {
paramJson = JsonUtils.toJsonString(requestParams);
}
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON)... | cloud-learning-lite | positive | 1,533 |
@Override
public void pushMenu(Player player, SMSMenu newActive) {
menus.add(new MenuPos(newActive, 1));
ItemMeta meta = stack.getItemMeta();
SMSValidate.notNull(meta, "There was a problem getting item metadata for your " + stack.getType());
SMSMenuItem menuItem = getActiveMenuItemAt(null, getSelectedItem());
List<Stri... | @Override
public void pushMenu(Player player, SMSMenu newActive) {
menus.add(new MenuPos(newActive, 1));
<DeepExtract>
ItemMeta meta = stack.getItemMeta();
SMSValidate.notNull(meta, "There was a problem getting item metadata for your " + stack.getType());
SMSMenuItem menuItem = getActiveMenuItemAt(null, getSelectedItem... | ScrollingMenuSign | positive | 1,534 |
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (vibrateType == i)
return;
vibrateType = i;
stAdapter.setText(position, itemStr[10][i]);
SharedPreferences.Editor edit = sp.edit();
edit.putInt("vibra", i);
edit.apply();
dialogInterface.dismiss();
} | @Override
public void onClick(DialogInterface dialogInterface, int i) {
if (vibrateType == i)
return;
vibrateType = i;
stAdapter.setText(position, itemStr[10][i]);
<DeepExtract>
SharedPreferences.Editor edit = sp.edit();
edit.putInt("vibra", i);
edit.apply();
</DeepExtract>
dialogInterface.dismiss();
} | DCTimer-Android | positive | 1,535 |
@Override
public void caseVirtualInvokeExpr(VirtualInvokeExpr v) {
SootMethod method = v.getMethod();
SootMethodRef methodRef = v.getMethodRef();
if (methodRef.getSignature().equals("<android.telephony.SmsMessage: " + "android.telephony.SmsMessage createFromPdu(byte[])>")) {
ExpressionSet op1 = resolveValue(v.getArg(0)... | @Override
public void caseVirtualInvokeExpr(VirtualInvokeExpr v) {
<DeepExtract>
SootMethod method = v.getMethod();
SootMethodRef methodRef = v.getMethodRef();
if (methodRef.getSignature().equals("<android.telephony.SmsMessage: " + "android.telephony.SmsMessage createFromPdu(byte[])>")) {
ExpressionSet op1 = resolveVal... | tiro | positive | 1,536 |
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Payment createdPayment = null;
APIContext apiContext = new APIContext(clientID, clientSecret, mode);
if (req.getParameter("PayerID") != null) {
Payment payment = new Payment();
if (req.getParameter("... | @Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
<DeepExtract>
Payment createdPayment = null;
APIContext apiContext = new APIContext(clientID, clientSecret, mode);
if (req.getParameter("PayerID") != null) {
Payment payment = new Payment();
if (req.... | PayPal-Java-SDK | positive | 1,537 |
public void ResumeGame() {
super.ResumeGame();
if (_timer != null) {
_timer.cancel();
_timer = null;
}
if (_updateRate != 0 && !_suspended) {
_timer = new GameTimer(_updateRate);
}
} | public void ResumeGame() {
super.ResumeGame();
<DeepExtract>
if (_timer != null) {
_timer.cancel();
_timer = null;
}
if (_updateRate != 0 && !_suspended) {
_timer = new GameTimer(_updateRate);
}
</DeepExtract>
} | monkey | positive | 1,538 |
@Override
public void initialize(URL url, ResourceBundle rb) {
Botao.prepararBotaoModal(this, botaoController);
idiomas.setItems(idioma.getListaIdiomas());
idiomas.getSelectionModel().select(idioma.getIdiomaSistema());
login.getItems().clear();
if (idiomas.getSelectionModel().getSelectedItem().equals("English")) {
moed... | @Override
public void initialize(URL url, ResourceBundle rb) {
Botao.prepararBotaoModal(this, botaoController);
idiomas.setItems(idioma.getListaIdiomas());
idiomas.getSelectionModel().select(idioma.getIdiomaSistema());
<DeepExtract>
login.getItems().clear();
if (idiomas.getSelectionModel().getSelectedItem().equals("Eng... | bgfinancas | positive | 1,539 |
public Criteria andDzdh1NotEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "dzdh1" + " cannot be null");
}
criteria.add(new Criterion("dzdh1 <>", value));
return (Criteria) this;
} | public Criteria andDzdh1NotEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "dzdh1" + " cannot be null");
}
criteria.add(new Criterion("dzdh1 <>", value));
</DeepExtract>
return (Criteria) this;
} | einvoice | positive | 1,540 |
public boolean isSymmetricTreeRecursive(TreeNode root) {
if (root == null) {
return true;
}
if (root.left != null && root.right != null) {
return root.left.val == root.right.val && isSymmetric(root.left.left, root.right.right) && isSymmetric(root.left.right, root.right.left);
}
return root.left == null && root.right ==... | public boolean isSymmetricTreeRecursive(TreeNode root) {
if (root == null) {
return true;
}
<DeepExtract>
if (root.left != null && root.right != null) {
return root.left.val == root.right.val && isSymmetric(root.left.left, root.right.right) && isSymmetric(root.left.right, root.right.left);
}
return root.left == null &&... | algorithm | positive | 1,541 |
public ParserRule getStatemachineRule() {
return rule;
} | public ParserRule getStatemachineRule() {
<DeepExtract>
return rule;
</DeepExtract>
} | Xtext-Sirius-integration | positive | 1,542 |
public Criteria andTypeEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "type" + " cannot be null");
}
criteria.add(new Criterion("type =", value));
return (Criteria) this;
} | public Criteria andTypeEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "type" + " cannot be null");
}
criteria.add(new Criterion("type =", value));
</DeepExtract>
return (Criteria) this;
} | community | positive | 1,543 |
public static void main(String[] args) {
PairManager manager1 = new PairManager1();
PairManager manager2 = new PairManager2();
testPair(manager1, manager2);
} | public static void main(String[] args) {
<DeepExtract>
PairManager manager1 = new PairManager1();
PairManager manager2 = new PairManager2();
testPair(manager1, manager2);
</DeepExtract>
} | ExerciseJava | positive | 1,544 |
public boolean isOnSecondaryHomeScreen(Context context) {
boolean checkSecondary = true;
if (U.getExternalDisplayID(context) == Display.DEFAULT_DISPLAY)
checkSecondary = false;
if (false && checkSecondary)
return onPrimaryHomeScreen || onSecondaryHomeScreen;
if (!false && checkSecondary)
return onSecondaryHomeScreen;
i... | public boolean isOnSecondaryHomeScreen(Context context) {
<DeepExtract>
boolean checkSecondary = true;
if (U.getExternalDisplayID(context) == Display.DEFAULT_DISPLAY)
checkSecondary = false;
if (false && checkSecondary)
return onPrimaryHomeScreen || onSecondaryHomeScreen;
if (!false && checkSecondary)
return onSecondar... | Taskbar | positive | 1,545 |
public static Request formPost(URL theURL, ParameterList theParams) {
Request aRequest = new Request(Method.POST, theURL);
if (mHeaders.containsKey(new Header(HttpHeaders.ContentType.getName(), MimeTypes.FormUrlEncoded.getMimeType()).getName())) {
new Header(HttpHeaders.ContentType.getName(), MimeTypes.FormUrlEncoded.g... | public static Request formPost(URL theURL, ParameterList theParams) {
Request aRequest = new Request(Method.POST, theURL);
if (mHeaders.containsKey(new Header(HttpHeaders.ContentType.getName(), MimeTypes.FormUrlEncoded.getMimeType()).getName())) {
new Header(HttpHeaders.ContentType.getName(), MimeTypes.FormUrlEncoded.g... | Empire | positive | 1,546 |
public long expires() {
return dateHeader(HEADER_EXPIRES, -1L);
} | public long expires() {
<DeepExtract>
return dateHeader(HEADER_EXPIRES, -1L);
</DeepExtract>
} | ProtocolSupportPocketStuff | positive | 1,547 |
public void setRenderingSettings(double[][] rs) {
dontFire = true;
this.renderingSettings = rs;
this.channel = channel;
gammaATF.setText(CustomDecimalFormat.format(renderingSettings[channel][ExtendedRenderingState.ALPHA_GAMMA], 1));
gammaCTF.setText(CustomDecimalFormat.format(renderingSettings[channel][ExtendedRenderin... | public void setRenderingSettings(double[][] rs) {
dontFire = true;
this.renderingSettings = rs;
<DeepExtract>
this.channel = channel;
gammaATF.setText(CustomDecimalFormat.format(renderingSettings[channel][ExtendedRenderingState.ALPHA_GAMMA], 1));
gammaCTF.setText(CustomDecimalFormat.format(renderingSettings[channel][Ex... | 3Dscript | positive | 1,548 |
public static void runRubyExample(String scriptName) {
File file = new File(scriptName);
String dirPart = file.getParent();
String scriptDir = METRICS_EXAMPLES_RUBY_DIR + dirPart;
runExample(scriptDir, scriptDir + "/" + file.getName(), DROPWIZARD_OPTIONS, null);
} | public static void runRubyExample(String scriptName) {
<DeepExtract>
File file = new File(scriptName);
String dirPart = file.getParent();
String scriptDir = METRICS_EXAMPLES_RUBY_DIR + dirPart;
runExample(scriptDir, scriptDir + "/" + file.getName(), DROPWIZARD_OPTIONS, null);
</DeepExtract>
} | vertx-examples | positive | 1,549 |
public String requestExternalNetworks() throws NotAuthorizedException, NotFoundException, ServerException, ServiceUnAvailableOrInternalError, IOException, MalformedURLException, ProtocolException, ParseException, CertificateException {
String gapiver = U.getGlanceEndpointAPIVER();
String napiver = U.getNeutronEndpointA... | public String requestExternalNetworks() throws NotAuthorizedException, NotFoundException, ServerException, ServiceUnAvailableOrInternalError, IOException, MalformedURLException, ProtocolException, ParseException, CertificateException {
<DeepExtract>
String gapiver = U.getGlanceEndpointAPIVER();
String napiver = U.getNe... | DroidStack | positive | 1,550 |
public Collection<UUID> asCollection(final int batchSize) throws JIException {
JICallBuilder callObject = new JICallBuilder(true);
callObject.setOpnum(2);
getCOMObject().call(callObject);
List<UUID> data = new ArrayList<UUID>();
int i = 0;
do {
i = next(data, batchSize);
} while (i == batchSize);
return data;
} | public Collection<UUID> asCollection(final int batchSize) throws JIException {
<DeepExtract>
JICallBuilder callObject = new JICallBuilder(true);
callObject.setOpnum(2);
getCOMObject().call(callObject);
</DeepExtract>
List<UUID> data = new ArrayList<UUID>();
int i = 0;
do {
i = next(data, batchSize);
} while (i == batch... | OPC_Client | positive | 1,551 |
public static byte[] decodeLines(String s) {
char[] buf = new char[s.length()];
int p = 0;
for (int ip = 0; ip < s.length(); ip++) {
char c = s.charAt(ip);
if (c != ' ' && c != '\r' && c != '\n' && c != '\t')
buf[p++] = c;
}
if (p % 4 != 0)
throw new IllegalArgumentException("Length of Base64 encoded input string is no... | public static byte[] decodeLines(String s) {
char[] buf = new char[s.length()];
int p = 0;
for (int ip = 0; ip < s.length(); ip++) {
char c = s.charAt(ip);
if (c != ' ' && c != '\r' && c != '\n' && c != '\t')
buf[p++] = c;
}
<DeepExtract>
if (p % 4 != 0)
throw new IllegalArgumentException("Length of Base64 encoded inpu... | NASDAQ-ITCH-5.0-Parser | positive | 1,552 |
public void hideWIFI() {
this.mNetworkTextView.setVisibility(View.VISIBLE);
this.mBatteryView.setStatus(UIWIFIView.STATUS_NONE);
} | public void hideWIFI() {
this.mNetworkTextView.setVisibility(View.VISIBLE);
<DeepExtract>
this.mBatteryView.setStatus(UIWIFIView.STATUS_NONE);
</DeepExtract>
} | Auie | positive | 1,553 |
public Criteria andRolenameIsNull() {
if ("roleName is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("roleName is null"));
return (Criteria) this;
} | public Criteria andRolenameIsNull() {
<DeepExtract>
if ("roleName is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("roleName is null"));
</DeepExtract>
return (Criteria) this;
} | examination_system- | positive | 1,554 |
public static void main(String[] args) {
int[] arr = { 12, 11, 13, 5, 6, 7 };
int n = arr.length;
HeapSort ob = new HeapSort();
int n = arr.length;
for (int i = n / 2 - 1; i >= 0; i--) heapify(arr, n, i);
for (int i = n - 1; i >= 0; i--) {
int temp = arr[0];
arr[0] = arr[i];
arr[i] = temp;
heapify(arr, i, 0);
}
System.... | public static void main(String[] args) {
int[] arr = { 12, 11, 13, 5, 6, 7 };
int n = arr.length;
HeapSort ob = new HeapSort();
int n = arr.length;
for (int i = n / 2 - 1; i >= 0; i--) heapify(arr, n, i);
for (int i = n - 1; i >= 0; i--) {
int temp = arr[0];
arr[0] = arr[i];
arr[i] = temp;
heapify(arr, i, 0);
}
System.... | Important-Java-Concepts | positive | 1,555 |
public void itemStateChanged(java.awt.event.ItemEvent evt) {
if (initialized && evt.getStateChange() == ItemEvent.SELECTED) {
String portName = String.valueOf(evt.getItem());
SerialPort newPort;
try {
newPort = (SerialPort) CommPortIdentifier.getPortIdentifier(portName).open(portName, 1000);
} catch (Exception e) {
new... | public void itemStateChanged(java.awt.event.ItemEvent evt) {
<DeepExtract>
if (initialized && evt.getStateChange() == ItemEvent.SELECTED) {
String portName = String.valueOf(evt.getItem());
SerialPort newPort;
try {
newPort = (SerialPort) CommPortIdentifier.getPortIdentifier(portName).open(portName, 1000);
} catch (Exce... | AndrOBD | positive | 1,556 |
public void settingsWarningDialogShown() {
mHasLoggingInfo = true;
mContext.sendBroadcast(newLoggingBroadcast(LoggingEvents.VoiceIme.SETTINGS_WARNING_DIALOG_SHOWN));
} | public void settingsWarningDialogShown() {
<DeepExtract>
mHasLoggingInfo = true;
</DeepExtract>
mContext.sendBroadcast(newLoggingBroadcast(LoggingEvents.VoiceIme.SETTINGS_WARNING_DIALOG_SHOWN));
} | Gingerbread-Keyboard | positive | 1,557 |
private static void initializeTokenSet() {
atomicSet.add(SimpleToken.of("C", "C", "C", "c"));
atomicSet.add(SimpleToken.of("O", "O", "O", "()", "0", "o"));
atomicSet.add(SimpleToken.of("N", "N", "N", "1O"));
atomicSet.add(SimpleToken.of("H", "H", "H", "tt", "1t", "t1", "I1", "t4", "11"));
atomicSet.add(SimpleToken.of("... | private static void initializeTokenSet() {
atomicSet.add(SimpleToken.of("C", "C", "C", "c"));
atomicSet.add(SimpleToken.of("O", "O", "O", "()", "0", "o"));
atomicSet.add(SimpleToken.of("N", "N", "N", "1O"));
atomicSet.add(SimpleToken.of("H", "H", "H", "tt", "1t", "t1", "I1", "t4", "11"));
atomicSet.add(SimpleToken.of("... | molvec | positive | 1,558 |
protected static CodeRangeBuffer setAllMultiByteRange(ScanEnvironment env, CodeRangeBuffer pbuf) {
return addCodeRangeToBuff(pbuf, env, mbcodeStartPosition(env.enc), LAST_CODE_POINT, true);
} | protected static CodeRangeBuffer setAllMultiByteRange(ScanEnvironment env, CodeRangeBuffer pbuf) {
<DeepExtract>
return addCodeRangeToBuff(pbuf, env, mbcodeStartPosition(env.enc), LAST_CODE_POINT, true);
</DeepExtract>
} | joni | positive | 1,559 |
public Builder mergeFrom(protoc.MessageProto.GrpcCharacterData other) {
if (other == protoc.MessageProto.GrpcCharacterData.getDefaultInstance())
return this;
if (other.getPlayerNumber() != false) {
setPlayerNumber(other.getPlayerNumber());
}
if (other.getHp() != 0) {
setHp(other.getHp());
}
if (other.getEnergy() != 0) ... | public Builder mergeFrom(protoc.MessageProto.GrpcCharacterData other) {
if (other == protoc.MessageProto.GrpcCharacterData.getDefaultInstance())
return this;
if (other.getPlayerNumber() != false) {
setPlayerNumber(other.getPlayerNumber());
}
if (other.getHp() != 0) {
setHp(other.getHp());
}
if (other.getEnergy() != 0) ... | FightingICE | positive | 1,560 |
public T get(T element) {
List<T> list = data[hashFunction(element)];
if (list != null) {
for (T temp : list) {
if (temp.equals(element)) {
return temp;
}
}
}
return null;
} | public T get(T element) {
<DeepExtract>
List<T> list = data[hashFunction(element)];
if (list != null) {
for (T temp : list) {
if (temp.equals(element)) {
return temp;
}
}
}
return null;
</DeepExtract>
} | data-structures-in-java | positive | 1,561 |
@Override
public DefaultMethodsCollection<Size, A> tail() {
return new DefaultMethodsCollection<>(delegate.tail());
} | @Override
public DefaultMethodsCollection<Size, A> tail() {
<DeepExtract>
return new DefaultMethodsCollection<>(delegate.tail());
</DeepExtract>
} | shoki | positive | 1,562 |
public <T> void waitUntil(final T target, final Matcher<T> condition, int timeoutInSeconds) {
awaitCondition(null, () -> condition.matches(target), timeoutInSeconds);
} | public <T> void waitUntil(final T target, final Matcher<T> condition, int timeoutInSeconds) {
<DeepExtract>
awaitCondition(null, () -> condition.matches(target), timeoutInSeconds);
</DeepExtract>
} | javatrove | positive | 1,563 |
@Deprecated
public java.util.Map<String, GrpcService.InferParameter> getParameters() {
return internalGetParameters().getMap();
} | @Deprecated
public java.util.Map<String, GrpcService.InferParameter> getParameters() {
<DeepExtract>
return internalGetParameters().getMap();
</DeepExtract>
} | dl_inference | positive | 1,564 |
public Actor commonParse(CocoCreatorUIEditor editor, ObjectData widget, Group parent, Actor actor) {
this.editor = editor;
actor.setName(widget.getName());
actor.setSize(widget.getSize().getWidth(), widget.getSize().getHeight());
actor.setOrigin(widget.getAnchorPoint().getScaleX() * actor.getWidth(), widget.getAnchorPo... | public Actor commonParse(CocoCreatorUIEditor editor, ObjectData widget, Group parent, Actor actor) {
this.editor = editor;
actor.setName(widget.getName());
actor.setSize(widget.getSize().getWidth(), widget.getSize().getHeight());
actor.setOrigin(widget.getAnchorPoint().getScaleX() * actor.getWidth(), widget.getAnchorPo... | cocostudio-ui-libgdx | positive | 1,565 |
public String dumpQueue() {
StringBuffer sb = new StringBuffer();
if (queue.length == 0)
sb.append("[]");
else {
sb.append('[');
sb.append(queue[0]);
for (int i = 1; i < queue.length; i++) {
sb.append(", ");
sb.append(queue[i]);
}
sb.append("]");
}
sb.append(", h=").append(head).append(", t=").append(tail).append(", s=... | public String dumpQueue() {
StringBuffer sb = new StringBuffer();
if (queue.length == 0)
sb.append("[]");
else {
sb.append('[');
sb.append(queue[0]);
for (int i = 1; i < queue.length; i++) {
sb.append(", ");
sb.append(queue[i]);
}
sb.append("]");
}
sb.append(", h=").append(head).append(", t=").append(tail).append(", s=... | Modbus4Android | positive | 1,566 |
public void removeSchedules(Schedule[] schedules) throws UnprocessableEntityException, StatusCodeException {
int[] ids = new int[schedules.length];
for (int i = 0; i < schedules.length; i++) {
ids[i] = schedules[i].getId();
}
String schedulesStr = "\"schedules\":[";
for (int i = 0; i < ids.length; i++) {
schedulesStr +... | public void removeSchedules(Schedule[] schedules) throws UnprocessableEntityException, StatusCodeException {
int[] ids = new int[schedules.length];
for (int i = 0; i < schedules.length; i++) {
ids[i] = schedules[i].getId();
}
<DeepExtract>
String schedulesStr = "\"schedules\":[";
for (int i = 0; i < ids.length; i++) {
... | nanoleaf-aurora | positive | 1,567 |
public Criteria andTotalpriceLessThanOrEqualTo(BigDecimal value) {
if (value == null) {
throw new RuntimeException("Value for " + "totalprice" + " cannot be null");
}
criteria.add(new Criterion("totalprice <=", value));
return (Criteria) this;
} | public Criteria andTotalpriceLessThanOrEqualTo(BigDecimal value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "totalprice" + " cannot be null");
}
criteria.add(new Criterion("totalprice <=", value));
</DeepExtract>
return (Criteria) this;
} | PetStore | positive | 1,568 |
private synchronized void onTaskCompleted(DownloadTask task) {
if (task.state != FILE_COMPLETED) {
Logger.d(TAG, "File #" + task.taskId + "| Completed in " + (System.nanoTime() - task.queueTime) / (1000 * 1000L) + " ms");
task.state = FILE_COMPLETED;
try {
if (task.file != null) {
task.file.close();
task.file = null;
}... | private synchronized void onTaskCompleted(DownloadTask task) {
if (task.state != FILE_COMPLETED) {
Logger.d(TAG, "File #" + task.taskId + "| Completed in " + (System.nanoTime() - task.queueTime) / (1000 * 1000L) + " ms");
task.state = FILE_COMPLETED;
try {
if (task.file != null) {
task.file.close();
task.file = null;
}... | telegram-trivia-bot | positive | 1,569 |
private int daysRemaining(String area) {
Long get = leaseExpireTime.get(area);
if (get <= System.currentTimeMillis())
return 0;
return (int) Math.ceil(((((double) (int) (get - System.currentTimeMillis()) / 1000D) / 60D) / 60D) / 24D);
} | private int daysRemaining(String area) {
Long get = leaseExpireTime.get(area);
if (get <= System.currentTimeMillis())
return 0;
<DeepExtract>
return (int) Math.ceil(((((double) (int) (get - System.currentTimeMillis()) / 1000D) / 60D) / 60D) / 24D);
</DeepExtract>
} | Residence | positive | 1,570 |
@Override
public EnumInstantiateStatus queryInstantiateStatus(String appInstanceId, MepHost mepHost, LcmLog lcmLog) {
int waitingTime = 0;
PodStatusInfos status = null;
PodEventsRes events = null;
while (waitingTime < TIMEOUT) {
String basePath = getUrlPrefix(mepHost.getLcmProtocol(), mepHost.getLcmIp(), mepHost.getLcm... | @Override
public EnumInstantiateStatus queryInstantiateStatus(String appInstanceId, MepHost mepHost, LcmLog lcmLog) {
int waitingTime = 0;
PodStatusInfos status = null;
PodEventsRes events = null;
while (waitingTime < TIMEOUT) {
String basePath = getUrlPrefix(mepHost.getLcmProtocol(), mepHost.getLcmIp(), mepHost.getLcm... | developer-be | positive | 1,571 |
public static byte[] gzipString(final String str, final String encType) throws IOException {
final byte[] stringData = str.getBytes(encType);
return gzipBytes(stringData, 0, stringData.length);
} | public static byte[] gzipString(final String str, final String encType) throws IOException {
final byte[] stringData = str.getBytes(encType);
<DeepExtract>
return gzipBytes(stringData, 0, stringData.length);
</DeepExtract>
} | hodor | positive | 1,573 |
@Test
public void returnMessage() {
final String queueName = "bizo";
final CreateQueueRequest createQueueRequest = new CreateQueueRequest().withQueueName(queueName);
sqs.createQueue(createQueueRequest);
final GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest().withQueueName(queueName);
final GetQueueUrlRes... | @Test
public void returnMessage() {
final String queueName = "bizo";
final CreateQueueRequest createQueueRequest = new CreateQueueRequest().withQueueName(queueName);
sqs.createQueue(createQueueRequest);
final GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest().withQueueName(queueName);
final GetQueueUrlRes... | aws-java-sdk-stubs | positive | 1,574 |
public void draw() {
pg.beginDraw();
group("matrix");
alphaFade(pg);
splitPass(pg);
pg.lights();
pg.shininess(slider("shine"));
hotShader("PhongFrag.glsl", "PhongVert.glsl", pg);
PVector translate = sliderXYZ("translate");
pg.translate(translate.x + width * .5f, translate.y + height * .5f, translate.z);
PVector rot = s... | public void draw() {
pg.beginDraw();
group("matrix");
alphaFade(pg);
splitPass(pg);
pg.lights();
pg.shininess(slider("shine"));
hotShader("PhongFrag.glsl", "PhongVert.glsl", pg);
PVector translate = sliderXYZ("translate");
pg.translate(translate.x + width * .5f, translate.y + height * .5f, translate.z);
PVector rot = s... | ProcessingSketches | positive | 1,576 |
@Override
public String toString() {
PurchaseState[] values = PurchaseState.values();
if (orderId < 0 || orderId >= values.length) {
return CANCELLED;
}
return values[orderId];
} | @Override
public String toString() {
<DeepExtract>
PurchaseState[] values = PurchaseState.values();
if (orderId < 0 || orderId >= values.length) {
return CANCELLED;
}
return values[orderId];
</DeepExtract>
} | android-checkout | positive | 1,577 |
public void pop(State state, Element previousTopElement) {
GLCoordinateElement prev = (GLCoordinateElement) previousTopElement;
boolean shouldBeEnabled = enabled;
enabled = prev.enabled;
if (this.enabled == shouldBeEnabled)
return;
this.enabled = shouldBeEnabled;
GL2 gl = GLU.getCurrentGL().getGL2();
if (shouldBeEnable... | public void pop(State state, Element previousTopElement) {
GLCoordinateElement prev = (GLCoordinateElement) previousTopElement;
boolean shouldBeEnabled = enabled;
enabled = prev.enabled;
<DeepExtract>
if (this.enabled == shouldBeEnabled)
return;
this.enabled = shouldBeEnabled;
GL2 gl = GLU.getCurrentGL().getGL2();
if (... | jogl-utils | positive | 1,578 |
public void surfaceCreated(SurfaceHolder holder) {
mSurfaceHolder = holder;
if (mUri == null || mSurfaceHolder == null) {
return;
}
Intent i = new Intent("com.android.music.musicservicecommand");
i.putExtra("command", "pause");
mContext.sendBroadcast(i);
release(false);
try {
mMediaPlayer = new MediaPlayer();
if (mAudi... | public void surfaceCreated(SurfaceHolder holder) {
mSurfaceHolder = holder;
<DeepExtract>
if (mUri == null || mSurfaceHolder == null) {
return;
}
Intent i = new Intent("com.android.music.musicservicecommand");
i.putExtra("command", "pause");
mContext.sendBroadcast(i);
release(false);
try {
mMediaPlayer = new MediaPlaye... | MediaNote-Android | positive | 1,579 |
@Override
public final void onWebsocketMessage(WebSocket conn, String message) {
} | @Override
<DeepExtract>
</DeepExtract>
public final void onWebsocketMessage(WebSocket conn, String message) {
<DeepExtract>
</DeepExtract>
} | raspberryjammod | positive | 1,580 |
public void rotate(double theta, CompPoint _focus) {
double[] pointRT = Geom.cartToPolar(this.getX() - _focus.getX(), this.getY() - _focus.getY());
double pointTheta = pointRT[1];
double pointR = pointRT[0];
double newPointTheta = pointTheta + theta;
CompPoint newPoint = Geom.polarToCart(pointR, newPointTheta);
this.x ... | public void rotate(double theta, CompPoint _focus) {
double[] pointRT = Geom.cartToPolar(this.getX() - _focus.getX(), this.getY() - _focus.getY());
double pointTheta = pointRT[1];
double pointR = pointRT[0];
double newPointTheta = pointTheta + theta;
CompPoint newPoint = Geom.polarToCart(pointR, newPointTheta);
this.x ... | Codeable_Objects | positive | 1,581 |
public double getVelocityMaximum() {
return (Double.parseDouble(decimalFormat.format(velocityMaximum)));
} | public double getVelocityMaximum() {
<DeepExtract>
return (Double.parseDouble(decimalFormat.format(velocityMaximum)));
</DeepExtract>
} | tgFX | positive | 1,582 |
@Override
public Object get(long timeout, TimeUnit unit) {
long start = System.currentTimeMillis();
if (!this.isDone()) {
this.lock.lock();
try {
while (!this.isDone()) {
this.doneCondition.await(2000, TimeUnit.MICROSECONDS);
if (System.currentTimeMillis() - start > timeout) {
throw new TimeoutRpcException("ResponseFut... | @Override
public Object get(long timeout, TimeUnit unit) {
long start = System.currentTimeMillis();
if (!this.isDone()) {
this.lock.lock();
try {
while (!this.isDone()) {
this.doneCondition.await(2000, TimeUnit.MICROSECONDS);
if (System.currentTimeMillis() - start > timeout) {
throw new TimeoutRpcException("ResponseFut... | jim-framework | positive | 1,583 |
@Override
protected void setUp() throws Exception {
super.setUp();
this.getInstrumentation().waitForIdleSync();
TestApplication app = (TestApplication) this.getInstrumentation().getTargetContext().getApplicationContext();
app.setObjectGraph(ObjectGraph.create(new TestModule()));
app.inject(this);
System.setProperty("de... | @Override
protected void setUp() throws Exception {
super.setUp();
this.getInstrumentation().waitForIdleSync();
TestApplication app = (TestApplication) this.getInstrumentation().getTargetContext().getApplicationContext();
app.setObjectGraph(ObjectGraph.create(new TestModule()));
app.inject(this);
<DeepExtract>
System.s... | JayPS-AndroidApp | positive | 1,585 |
public Criteria andClassroomIsNull() {
if ("classRoom is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("classRoom is null"));
return (Criteria) this;
} | public Criteria andClassroomIsNull() {
<DeepExtract>
if ("classRoom is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("classRoom is null"));
</DeepExtract>
return (Criteria) this;
} | SpringBoot_EducationalMS | positive | 1,586 |
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if (mProgressBarVisible)
showProgressBar();
if (mScreen != null)
loadGraphs();
ViewGroup layout = (LinearLayout) getView().findViewById(R.id.graphs);
layout.removeAllViews();
boolean graphsDisplaye... | @Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if (mProgressBarVisible)
showProgressBar();
if (mScreen != null)
loadGraphs();
<DeepExtract>
ViewGroup layout = (LinearLayout) getView().findViewById(R.id.graphs);
layout.removeAllViews();
boolean ... | zax | positive | 1,587 |
@Override
public void enableModule() {
if (!mwState.readyToClose) {
byte[] bleData = Registers.buildWriteCommand(Register.ENABLE, (byte) 1);
if (mwState.isRecording) {
mwState.etBuilder.withDestRegister(Register.ENABLE, Arrays.copyOfRange(bleData, 2, bleData.length), false);
} else {
queueCommand(mwState, bleData);
}
}... | @Override
public void enableModule() {
<DeepExtract>
if (!mwState.readyToClose) {
byte[] bleData = Registers.buildWriteCommand(Register.ENABLE, (byte) 1);
if (mwState.isRecording) {
mwState.etBuilder.withDestRegister(Register.ENABLE, Arrays.copyOfRange(bleData, 2, bleData.length), false);
} else {
queueCommand(mwState,... | mongodb-iot-mqtt-example | positive | 1,588 |
public static byte[] decrypt3DES(byte[] data, byte[] key) {
if (data == null || data.length == 0 || key == null || key.length == 0)
return null;
try {
SecretKeySpec keySpec = new SecretKeySpec(key, TripleDES_Algorithm);
Cipher cipher = Cipher.getInstance(TripleDES_Transformation);
SecureRandom random = new SecureRandom... | public static byte[] decrypt3DES(byte[] data, byte[] key) {
<DeepExtract>
if (data == null || data.length == 0 || key == null || key.length == 0)
return null;
try {
SecretKeySpec keySpec = new SecretKeySpec(key, TripleDES_Algorithm);
Cipher cipher = Cipher.getInstance(TripleDES_Transformation);
SecureRandom random = ne... | AndroidBase | positive | 1,589 |
@Override
public void setSettingList(List<PSetting> listSetting) throws RemoteException {
int uid = -1;
for (PSetting setting : listSetting) if (uid < 0)
uid = setting.uid;
else if (uid != setting.uid)
throw new SecurityException();
if (uid >= 0)
if (Util.getUserId(uid) != Util.getUserId(Binder.getCallingUid()))
throw ... | @Override
public void setSettingList(List<PSetting> listSetting) throws RemoteException {
int uid = -1;
for (PSetting setting : listSetting) if (uid < 0)
uid = setting.uid;
else if (uid != setting.uid)
throw new SecurityException();
<DeepExtract>
if (uid >= 0)
if (Util.getUserId(uid) != Util.getUserId(Binder.getCalling... | XLocation | positive | 1,590 |
public static Bitmap compressByScale(Bitmap src, int newWidth, int newHeight, boolean recycle) {
if (isEmptyBitmap(src)) {
return null;
}
Bitmap ret = Bitmap.createScaledBitmap(src, newWidth, newHeight, true);
if (recycle && !src.isRecycled()) {
src.recycle();
}
return ret;
} | public static Bitmap compressByScale(Bitmap src, int newWidth, int newHeight, boolean recycle) {
<DeepExtract>
if (isEmptyBitmap(src)) {
return null;
}
Bitmap ret = Bitmap.createScaledBitmap(src, newWidth, newHeight, true);
if (recycle && !src.isRecycled()) {
src.recycle();
}
return ret;
</DeepExtract>
} | InterviewQA | positive | 1,591 |
public RestResponse post() throws RestException {
if (urlString == null) {
throw new RestException("No URL is set");
}
try {
URLConnection connection;
if (true) {
connection = initURLConnection(urlString, "POST");
} else {
connection = initURLConnection(urlString, "PUT");
}
for (final Map.Entry<String, String> header :... | public RestResponse post() throws RestException {
<DeepExtract>
if (urlString == null) {
throw new RestException("No URL is set");
}
try {
URLConnection connection;
if (true) {
connection = initURLConnection(urlString, "POST");
} else {
connection = initURLConnection(urlString, "PUT");
}
for (final Map.Entry<String, St... | vault-java-driver | positive | 1,592 |
private synchronized void initAlbum() {
album.setAlbumCover(null);
album.setAlbumTitle(context.getString(R.string.album_untitled));
this.browserController = browserController;
this.album.setBrowserController(browserController);
} | private synchronized void initAlbum() {
album.setAlbumCover(null);
album.setAlbumTitle(context.getString(R.string.album_untitled));
<DeepExtract>
this.browserController = browserController;
this.album.setBrowserController(browserController);
</DeepExtract>
} | Ninja | positive | 1,593 |
@Override
public int size() {
return this.isEmpty() ? 0 : size0(this.tail(), 0 + 1);
} | @Override
public int size() {
<DeepExtract>
return this.isEmpty() ? 0 : size0(this.tail(), 0 + 1);
</DeepExtract>
} | dexx | positive | 1,594 |
public Criteria andGoodsPriceEqualTo(Double value) {
if (value == null) {
throw new RuntimeException("Value for " + "goodsPrice" + " cannot be null");
}
criteria.add(new Criterion("goods_price =", value));
return (Criteria) this;
} | public Criteria andGoodsPriceEqualTo(Double value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "goodsPrice" + " cannot be null");
}
criteria.add(new Criterion("goods_price =", value));
</DeepExtract>
return (Criteria) this;
} | ssmxiaomi | positive | 1,595 |
public void openSearch(String query) {
if (true)
mAvoidTriggerTextWatcher = true;
mSearchEditText.setText("");
mSearchEditText.append(query);
mAvoidTriggerTextWatcher = false;
if (SearchViewState.SEARCH == SearchViewState.NORMAL) {
if (mCurrentState == SearchViewState.EDITING) {
fromEditingToNormal();
} else if (mCurre... | public void openSearch(String query) {
if (true)
mAvoidTriggerTextWatcher = true;
mSearchEditText.setText("");
mSearchEditText.append(query);
mAvoidTriggerTextWatcher = false;
<DeepExtract>
if (SearchViewState.SEARCH == SearchViewState.NORMAL) {
if (mCurrentState == SearchViewState.EDITING) {
fromEditingToNormal();
} e... | Nibo | positive | 1,596 |
public Properties putSku(String sku) {
super.putValue(SKU_KEY, sku);
return this;
} | public Properties putSku(String sku) {
<DeepExtract>
super.putValue(SKU_KEY, sku);
return this;
</DeepExtract>
} | analytics-android | positive | 1,597 |
public Criteria andPictureEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "picture" + " cannot be null");
}
criteria.add(new Criterion("picture =", value));
return (Criteria) this;
} | public Criteria andPictureEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "picture" + " cannot be null");
}
criteria.add(new Criterion("picture =", value));
</DeepExtract>
return (Criteria) this;
} | Maven-Spring-SpringMVC-Mybatis | positive | 1,598 |
public final void normalize() {
double[] tmp_rot = new double[9];
double[] tmp_scale = new double[3];
double[] tmp = new double[9];
tmp[0] = m00;
tmp[1] = m01;
tmp[2] = m02;
tmp[3] = m10;
tmp[4] = m11;
tmp[5] = m12;
tmp[6] = m20;
tmp[7] = m21;
tmp[8] = m22;
compute_svd(tmp, tmp_scale, tmp_rot);
return;
this.m00 = tmp_r... | public final void normalize() {
double[] tmp_rot = new double[9];
double[] tmp_scale = new double[3];
<DeepExtract>
double[] tmp = new double[9];
tmp[0] = m00;
tmp[1] = m01;
tmp[2] = m02;
tmp[3] = m10;
tmp[4] = m11;
tmp[5] = m12;
tmp[6] = m20;
tmp[7] = m21;
tmp[8] = m22;
compute_svd(tmp, tmp_scale, tmp_rot);
return;
</... | vecmath | positive | 1,599 |
public static String createArchiveId() {
try {
return new String(Base64.encode(generateRandomBytes(16)), Charsets.US_ASCII.name());
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
} | public static String createArchiveId() {
<DeepExtract>
try {
return new String(Base64.encode(generateRandomBytes(16)), Charsets.US_ASCII.name());
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
</DeepExtract>
} | b1-pack | positive | 1,600 |
public void clearChildSize() {
hasChildSize = false;
hasChildSize = true;
if (this.childSize != DEFAULT_CHILD_SIZE) {
this.childSize = DEFAULT_CHILD_SIZE;
requestLayout();
}
} | public void clearChildSize() {
hasChildSize = false;
<DeepExtract>
hasChildSize = true;
if (this.childSize != DEFAULT_CHILD_SIZE) {
this.childSize = DEFAULT_CHILD_SIZE;
requestLayout();
}
</DeepExtract>
} | Auro | positive | 1,601 |
public Criteria andUsernameLessThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "username" + " cannot be null");
}
criteria.add(new Criterion("userName <", value));
return (Criteria) this;
} | public Criteria andUsernameLessThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "username" + " cannot be null");
}
criteria.add(new Criterion("userName <", value));
</DeepExtract>
return (Criteria) this;
} | JavaWeb-WeChatMini | positive | 1,603 |
public long getMaxInputPayloadSizeBytes() {
return mProperties.getLong("secor.max.input.payload.size.bytes");
} | public long getMaxInputPayloadSizeBytes() {
<DeepExtract>
return mProperties.getLong("secor.max.input.payload.size.bytes");
</DeepExtract>
} | secor | positive | 1,604 |
public void componentHidden(java.awt.event.ComponentEvent evt) {
} | public void componentHidden(java.awt.event.ComponentEvent evt) {
<DeepExtract>
</DeepExtract>
} | jmn | positive | 1,606 |
public String getWinningMessage() {
if (!hasWinner())
throw new WinnerMessageProvider.NoWinnerAvailable();
Mark winner = provider.getWinner();
return winMessagesMapper.map(winner);
} | public String getWinningMessage() {
<DeepExtract>
if (!hasWinner())
throw new WinnerMessageProvider.NoWinnerAvailable();
</DeepExtract>
Mark winner = provider.getWinner();
return winMessagesMapper.map(winner);
} | BoardGames.TDD-London-School | positive | 1,607 |
public void stateUpdated() {
if (cnr != null) {
cnr.halt();
cnr = null;
}
double mpp = 1 / zoom;
double leftX = wx - mpp * getWidth() / 2;
double topY = wy - mpp * getHeight() / 2;
if (wg == null) {
colorFunc = null;
} else if (normalShadingEnabled) {
NormalShadingGroundColorFunction gcf = new NormalShadingGroundColorF... | public void stateUpdated() {
<DeepExtract>
if (cnr != null) {
cnr.halt();
cnr = null;
}
</DeepExtract>
double mpp = 1 / zoom;
double leftX = wx - mpp * getWidth() / 2;
double topY = wy - mpp * getHeight() / 2;
if (wg == null) {
colorFunc = null;
} else if (normalShadingEnabled) {
NormalShadingGroundColorFunction gcf = ... | TMCMG | positive | 1,608 |
@Test
public void test01() {
String input = "one";
String actual = reusableResolver.expand(input);
assertEquals(input, actual);
VariableResolver newInstance = new VariableResolver(environmentMap);
actual = newInstance.expand(input);
assertEquals(input, actual);
} | @Test
public void test01() {
String input = "one";
<DeepExtract>
String actual = reusableResolver.expand(input);
assertEquals(input, actual);
VariableResolver newInstance = new VariableResolver(environmentMap);
actual = newInstance.expand(input);
assertEquals(input, actual);
</DeepExtract>
} | unravl | positive | 1,609 |
@Override
public void removeColor(ItemStack stack) {
NBTTagCompound nbt = stack.hasTagCompound() ? stack.getTagCompound() : new NBTTagCompound();
nbt.setInteger("color", this.defaultColor);
stack.setTagCompound(nbt);
} | @Override
public void removeColor(ItemStack stack) {
<DeepExtract>
NBTTagCompound nbt = stack.hasTagCompound() ? stack.getTagCompound() : new NBTTagCompound();
nbt.setInteger("color", this.defaultColor);
stack.setTagCompound(nbt);
</DeepExtract>
} | Traincraft | positive | 1,611 |
@EventHandler
public void GalactCoreCompat(final FMLPreInitializationEvent e) {
LogHelper.info("Attempting to load compat. biome classes...");
for (final String clazz : this.galactCoreClasses) if (ReflectionHelper.tryLoadClass(clazz) == null)
LogHelper.debug("Failed to load compat. biome class " + clazz);
for (final St... | @EventHandler
public void GalactCoreCompat(final FMLPreInitializationEvent e) {
LogHelper.info("Attempting to load compat. biome classes...");
for (final String clazz : this.galactCoreClasses) if (ReflectionHelper.tryLoadClass(clazz) == null)
LogHelper.debug("Failed to load compat. biome class " + clazz);
<DeepExtract>... | BiomeTweaker | positive | 1,612 |
void startSession(Date date, boolean autoCaptured) {
if ((!config.shouldAutoCaptureSessions() && autoCaptured) || !config.shouldNotifyForReleaseStage() || shuttingDown.get()) {
return;
}
Date roundedStartDate = DateUtils.roundTimeToLatestMinute(date);
session.set(new Session(UUID.randomUUID().toString(), roundedStartDa... | void startSession(Date date, boolean autoCaptured) {
if ((!config.shouldAutoCaptureSessions() && autoCaptured) || !config.shouldNotifyForReleaseStage() || shuttingDown.get()) {
return;
}
Date roundedStartDate = DateUtils.roundTimeToLatestMinute(date);
session.set(new Session(UUID.randomUUID().toString(), roundedStartDa... | bugsnag-java | positive | 1,613 |
@Override
public final <T> T register(T bean) {
return bean;
beanMap.register(bean);
return bean;
} | @Override
public final <T> T register(T bean) {
<DeepExtract>
return bean;
</DeepExtract>
beanMap.register(bean);
<DeepExtract>
return bean;
</DeepExtract>
} | avaje-inject | positive | 1,614 |
public static <T extends QueryEntity, R> void sequentialQueryAndProcessAll(Class<T> type, String where, Set<String> fields, Consumer<T> process) {
queryForAll(type, where, fields, (batch) -> {
batch.forEach(process);
}, 0);
} | public static <T extends QueryEntity, R> void sequentialQueryAndProcessAll(Class<T> type, String where, Set<String> fields, Consumer<T> process) {
<DeepExtract>
queryForAll(type, where, fields, (batch) -> {
batch.forEach(process);
}, 0);
</DeepExtract>
} | starter-kit-spring-maven | positive | 1,615 |
@Override
public List<ClientRelation> getRelationListByTargetId(String targetId) {
LambdaQueryWrapper<ClientRelation> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ClientRelation::getTargetId, targetId);
if (ObjectUtil.isNotEmpty(null)) {
lambdaQueryWrapper.eq(ClientRelation::getCategory, null)... | @Override
public List<ClientRelation> getRelationListByTargetId(String targetId) {
<DeepExtract>
LambdaQueryWrapper<ClientRelation> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ClientRelation::getTargetId, targetId);
if (ObjectUtil.isNotEmpty(null)) {
lambdaQueryWrapper.eq(ClientRelation::getC... | xiaonuo-vue | positive | 1,616 |
@Override
public void onTransitionEnd(@NonNull Transition transition) {
pager.setVisibility(VISIBLE);
snapshotView.setVisibility(INVISIBLE);
if (urls.size() > 1) {
int posi = getRealPosition();
tv_pager_indicator.setText((posi + 1) + "/" + urls.size());
}
if (isShowSaveBtn)
tv_save.setVisibility(VISIBLE);
photoViewCont... | @Override
public void onTransitionEnd(@NonNull Transition transition) {
pager.setVisibility(VISIBLE);
snapshotView.setVisibility(INVISIBLE);
<DeepExtract>
if (urls.size() > 1) {
int posi = getRealPosition();
tv_pager_indicator.setText((posi + 1) + "/" + urls.size());
}
if (isShowSaveBtn)
tv_save.setVisibility(VISIBLE);... | XPopup | positive | 1,617 |
public static <T> Object $(T param) {
T[] out = (T[]) Array.newInstance(getClass(param), 1);
Array.set(out, 0, param);
return out;
} | public static <T> Object $(T param) {
<DeepExtract>
T[] out = (T[]) Array.newInstance(getClass(param), 1);
Array.set(out, 0, param);
return out;
</DeepExtract>
} | jnetrobust | positive | 1,618 |
public Criteria andVersionLessThan(int value) {
if (value == null) {
throw new RuntimeException("Value for " + "version" + " cannot be null");
}
criteria.add(new Criterion("version <", value));
return (Criteria) this;
} | public Criteria andVersionLessThan(int value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "version" + " cannot be null");
}
criteria.add(new Criterion("version <", value));
</DeepExtract>
return (Criteria) this;
} | oauth2-resource | positive | 1,619 |
private void parseExpressionList() throws ParsingException {
int type = lookahead().getType();
while (type == SchemeToken.COMMENT || type == SchemeToken.WSPACE) {
consume();
type = lookahead().getType();
}
while (lookahead() != SchemeToken.EOF && lookahead().getType() != SchemeToken.RPAREN) {
parseExpression();
skipWhi... | private void parseExpressionList() throws ParsingException {
<DeepExtract>
int type = lookahead().getType();
while (type == SchemeToken.COMMENT || type == SchemeToken.WSPACE) {
consume();
type = lookahead().getType();
}
</DeepExtract>
while (lookahead() != SchemeToken.EOF && lookahead().getType() != SchemeToken.RPAREN)... | SchemeScript | positive | 1,620 |
public void removeFirstRow() {
return numOfElements;
rows.remove(0);
} | public void removeFirstRow() {
<DeepExtract>
return numOfElements;
</DeepExtract>
rows.remove(0);
} | TrajectoryClustering | positive | 1,621 |
@Benchmark
public void defaultRTreeSearchOf1000PointsMaxChildren128(Blackhole bh) {
smallDefaultTreeM128.search(Geometries.rectangle(500, 500, 630, 630)).subscribe(consumeWith(bh));
} | @Benchmark
public void defaultRTreeSearchOf1000PointsMaxChildren128(Blackhole bh) {
<DeepExtract>
smallDefaultTreeM128.search(Geometries.rectangle(500, 500, 630, 630)).subscribe(consumeWith(bh));
</DeepExtract>
} | rtree | positive | 1,622 |
public void insert(final InsnList insns) {
if (insns.size == 0) {
return;
}
size += insns.size;
if (first == null) {
first = insns.first;
last = insns.last;
} else {
AbstractInsnNode elem = insns.last;
first.prev = elem;
elem.next = first;
first = insns.first;
}
cache = null;
if (false) {
AbstractInsnNode insn = first;... | public void insert(final InsnList insns) {
if (insns.size == 0) {
return;
}
size += insns.size;
if (first == null) {
first = insns.first;
last = insns.last;
} else {
AbstractInsnNode elem = insns.last;
first.prev = elem;
elem.next = first;
first = insns.first;
}
cache = null;
<DeepExtract>
if (false) {
AbstractInsnNode... | bearded-octo-nemesis | positive | 1,623 |
@Override
public void setV2c(Tuple2<Byte> v) {
byte[] data = new byte[] { v._0, v._1 };
int t = type();
if (data == null || data.length % CvType.channels(t) != 0)
throw new UnsupportedOperationException("Provided data element number (" + (data == null ? 0 : data.length) + ") should be multiple of the Mat channels count... | @Override
public void setV2c(Tuple2<Byte> v) {
byte[] data = new byte[] { v._0, v._1 };
<DeepExtract>
int t = type();
if (data == null || data.length % CvType.channels(t) != 0)
throw new UnsupportedOperationException("Provided data element number (" + (data == null ? 0 : data.length) + ") should be multiple of the Mat ... | virtual_robot | positive | 1,624 |
public Criteria andTrademarkLessThanOrEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "trademark" + " cannot be null");
}
criteria.add(new Criterion("trademark <=", value));
return (Criteria) this;
} | public Criteria andTrademarkLessThanOrEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "trademark" + " cannot be null");
}
criteria.add(new Criterion("trademark <=", value));
</DeepExtract>
return (Criteria) this;
} | uccn | positive | 1,625 |
public int getUpperZ() {
if (this.center != null) {
if (this.size > 0) {
if (this.world == null) {
this.world = Bukkit.getWorld("world");
}
if (this.world != null) {
int lx = this.center.getBlockX() + this.size;
int lz = this.center.getBlockZ() + this.size;
int px = this.center.getBlockX() - this.size;
int pz = this.ce... | public int getUpperZ() {
<DeepExtract>
if (this.center != null) {
if (this.size > 0) {
if (this.world == null) {
this.world = Bukkit.getWorld("world");
}
if (this.world != null) {
int lx = this.center.getBlockX() + this.size;
int lz = this.center.getBlockZ() + this.size;
int px = this.center.getBlockX() - this.size;
in... | wildskript | positive | 1,626 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.