auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean isMigrationNeeded(Key<FeedbackResponseComment> entity) { FeedbackResponseComment comment = ofy().load().key(entity).now(); return comment.getCommentGiverType() == null; }

Target:
protected boolean isMigrationNeeded(Key<FeedbackResponseComment> entity) { FeedbackResponseComment comment = ofy().load().key(entity).now(); try { Field commentGiverType = comment.getClass().getDeclaredField("commentGiverType"); commentGiverType.setAccessible(true); return commentGiverType.get(comment) == null; } catch (ReflectiveOperationException e) { return true; } }
Source:
protected void setControlEnabled(SWTGridCell gridCell, Control control, boolean enabled) { if (isDisableRenderedAsEditable() && (getVElement().getLabelAlignment() == LabelAlignment.NONE && gridCell.getColumn() == 1 || hasLeftLabelAlignment() && gridCell.getColumn() == 2)) { Control controlToUnset = control; if (isControlUnsettable()) { controlToUnset = Composite.class .cast(Composite.class.cast(Composite.class.cast(control).getChildren()[0]).getChildren()[0]) .getChildren()[0]; } Text.class.cast(controlToUnset).setEditable(enabled); } else { if (gridCell.getColumn() == 2) { super.setControlEnabled(gridCell, Composite.class.cast(control).getChildren()[0], enabled); } else { super.setControlEnabled(gridCell, control, enabled); } } }

Target:
protected void setControlEnabled(SWTGridCell gridCell, Control control, boolean enabled) { if (isDisableRenderedAsEditable() && (getVElement().getLabelAlignment() == LabelAlignment.NONE && gridCell.getColumn() == 1 || hasLeftLabelAlignment() && gridCell.getColumn() == 2)) { Control controlToUnset = control; if (isControlUnsettable()) { controlToUnset = Composite.class .cast(Composite.class.cast(Composite.class.cast(control).getChildren()[0]).getChildren()[0]) .getChildren()[0]; } Text.class.cast(controlToUnset).setEditable(enabled); } else { if (getVElement().getLabelAlignment() == LabelAlignment.NONE && gridCell.getColumn() == 1 || hasLeftLabelAlignment() && gridCell.getColumn() == 2) { super.setControlEnabled(gridCell, Composite.class.cast(control).getChildren()[0], enabled); } else { super.setControlEnabled(gridCell, control, enabled); } } }
Source:
public void beginAnalysis() { queryStateTimer.beginAnalysis(); }

Target:
public void beginAnalysis() { queryStateTimer.beginAnalyzing(); }
Source:
public void testByteMapsToEnumOutOfOrdinalRange() { mapper = getMapper(new String[] { "enumMapping.xml" }); MyBeanPrimeByte src = new MyBeanPrimeByte(); src.setFirst((byte) 0); src.setSecond((byte) 3); MyBean dest = mapper.map(src, MyBean.class); }

Target:
public void testByteMapsToEnumOutOfOrdinalRange() { testExpectedException.expect(MappingException.class); testExpectedException.expectMessage(startsWith("Cannot convert")); mapper = getMapper("mappings/enumMapping.xml"); MyBeanPrimeByte src = new MyBeanPrimeByte(); src.setFirst((byte) 0); src.setSecond((byte) 3); mapper.map(src, MyBean.class); }
Source:
public boolean visit(IResource resource) throws CoreException { IPath path = resource.getFullPath(); if(resource instanceof IFile) { if(visited.contains(path)) { return false; } visited.add(path); IFile f = (IFile)resource; for (int i = 0; i < outs.length; i++) { if(outs[i].isPrefixOf(path)) { return false; } } for (int i = 0; i < srcs.length; i++) { if(batch_jobs[i].isPrefixOf(path)) { if(f.getName().endsWith(".xml")) { fileSet.addBatchJob(f); } } else if(srcs[i].isPrefixOf(path)) { if(f.getName().endsWith(".java")) { ICompilationUnit unit = EclipseUtil.getCompilationUnit(f); if(unit != null) { fileSet.add(f.getFullPath(), unit.getTypes()); } } Set<IFile> ds = getDependentFiles(path, visited); if(ds != null) for (IFile d: ds) visit(d); return false; } } Set<IFile> ds = getDependentFiles(path, visited); if(ds != null) for (IFile d: ds) visit(d); } if(resource instanceof IFolder) { for (int i = 0; i < outs.length; i++) { if(outs[i].isPrefixOf(path)) { return false; } } for (int i = 0; i < srcs.length; i++) { if(srcs[i].isPrefixOf(path) || path.isPrefixOf(srcs[i])) { return true; } } if(resource == resource.getProject()) { return true; } return false; } return true; }

Target:
public boolean visit(IResource resource) throws CoreException { IPath path = resource.getFullPath(); if(resource instanceof IFile) { if(visited.contains(path)) { return false; } visited.add(path); IFile f = (IFile)resource; for (int i = 0; i < outs.length; i++) { if(outs[i].isPrefixOf(path)) { return false; } } for (int i = 0; i < srcs.length; i++) { if(batch_jobs[i].isPrefixOf(path)) { if(f.getName().toLowerCase().endsWith(".xml")) { fileSet.addBatchJob(f); } } else if(srcs[i].isPrefixOf(path)) { if(f.getName().toLowerCase().endsWith(".java")) { ICompilationUnit unit = EclipseUtil.getCompilationUnit(f); if(unit != null) { fileSet.add(f.getFullPath(), unit.getTypes()); } } Set<IFile> ds = getDependentFiles(path, visited); if(ds != null) for (IFile d: ds) visit(d); return false; } } Set<IFile> ds = getDependentFiles(path, visited); if(ds != null) for (IFile d: ds) visit(d); } else if(resource instanceof IFolder) { for (int i = 0; i < outs.length; i++) { if(outs[i].isPrefixOf(path)) { return false; } } for (int i = 0; i < srcs.length; i++) { if(srcs[i].isPrefixOf(path) || path.isPrefixOf(srcs[i])) { return true; } } if(resource == resource.getProject()) { return true; } return false; } return true; }
Source:
private void onInvalidHeartbeat(MembersViewMetadata senderMembersViewMetadata) { Address senderAddress = senderMembersViewMetadata.getMemberAddress(); if (clusterService.isMaster()) { if (!clusterService.getClusterJoinManager().isMastershipClaimInProgress()) { logger.fine("Sending explicit suspicion to " + senderAddress + " for heartbeat " + senderMembersViewMetadata + ", because it is not a member of this cluster" + " or its heartbeat cannot be validated!"); clusterService.sendExplicitSuspicion(senderMembersViewMetadata); } } else { MemberImpl master = clusterService.getMember(clusterService.getMasterAddress()); if (clusterService.getMembershipManager().isMemberSuspected(master.getAddress(), master.getUuid())) { logger.fine("Not sending heartbeat complaint for " + senderMembersViewMetadata + " to suspected master: " + master.getAddress()); return; } logger.fine("Sending heartbeat complaint to master " + master.getAddress() + " for heartbeat " + senderMembersViewMetadata + ", because it is not a member of this cluster" + " or its heartbeat cannot be validated!"); sendHeartbeatComplaintToMaster(senderMembersViewMetadata); } }

Target:
private void onInvalidHeartbeat(MembersViewMetadata senderMembersViewMetadata) { Address senderAddress = senderMembersViewMetadata.getMemberAddress(); if (clusterService.isMaster()) { if (!clusterService.getClusterJoinManager().isMastershipClaimInProgress()) { logger.fine("Sending explicit suspicion to " + senderAddress + " for heartbeat " + senderMembersViewMetadata + ", because it is not a member of this cluster" + " or its heartbeat cannot be validated!"); clusterService.sendExplicitSuspicion(senderMembersViewMetadata); } } else { MemberImpl master = clusterService.getMember(clusterService.getMasterAddress()); if (clusterService.getMembershipManager().isMemberSuspected(master)) { logger.fine("Not sending heartbeat complaint for " + senderMembersViewMetadata + " to suspected master: " + master.getAddress()); return; } logger.fine("Sending heartbeat complaint to master " + master.getAddress() + " for heartbeat " + senderMembersViewMetadata + ", because it is not a member of this cluster" + " or its heartbeat cannot be validated!"); sendHeartbeatComplaintToMaster(senderMembersViewMetadata); } }
Source:
public boolean isActivated() { JenkinsLocationConfiguration loc = JenkinsLocationConfiguration.get(); return loc == null || loc.getUrl() == null; }

Target:
public boolean isActivated() { JenkinsLocationConfiguration loc = JenkinsLocationConfiguration.get(); return loc != null && ( loc.getUrl() == null || !UrlHelper.isValidRootUrl(loc.getUrl()) ); }
Source:
public double getTitleFontSize() { return 0; }

Target:
public double getTitleFontSize() { return label.isPresent() ? label.get().getText().getFontSize() : 0; }
Source:
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_sort: ReadingListsSortBottomSheetPresenter dialogFragment = new ReadingListsSortBottomSheetPresenter(); dialogFragment.show(getChildFragmentManager(), SortReadingListsDialog.newInstance(this::sortListsBy, Prefs.getReadingListSortMode(ReadingList.SORT_BY_NAME_ASC))); return true; case R.id.create_list: String title = getString(R.string.reading_list_name_sample); List<String> existingTitles = new ArrayList<>(); for (ReadingList tempList : readingLists) { existingTitles.add(tempList.title()); } ReadingListTitleDialog.readingListTitleDialog(getContext(), title, existingTitles, text -> { ReadingList list = ReadingListDbHelper.instance().createList(text.toString(), ""); readingLists.add(list); readingListView.getAdapter().notifyDataSetChanged(); updateEmptyState(null); readingListView.smoothScrollToPosition(readingLists.size() - 1); }).show(); return true; case R.id.menu_search_lists: ((AppCompatActivity) getActivity()) .startSupportActionMode(searchActionModeCallback); return true; default: return super.onOptionsItemSelected(item); } }

Target:
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_sort: ExclusiveBottomSheetPresenter bottomSheetPresenter = new ExclusiveBottomSheetPresenter(); bottomSheetPresenter.show(getChildFragmentManager(), SortReadingListsDialog.newInstance(Prefs.getReadingListSortMode(ReadingList.SORT_BY_NAME_ASC))); return true; case R.id.create_list: String title = getString(R.string.reading_list_name_sample); List<String> existingTitles = new ArrayList<>(); for (ReadingList tempList : readingLists) { existingTitles.add(tempList.title()); } ReadingListTitleDialog.readingListTitleDialog(getContext(), title, existingTitles, text -> { ReadingList list = ReadingListDbHelper.instance().createList(text.toString(), ""); readingLists.add(list); readingListView.getAdapter().notifyDataSetChanged(); updateEmptyState(null); readingListView.smoothScrollToPosition(readingLists.size() - 1); }).show(); return true; case R.id.menu_search_lists: ((AppCompatActivity) getActivity()) .startSupportActionMode(searchActionModeCallback); return true; default: return super.onOptionsItemSelected(item); } }
Source:
public void acceptQuery(UUID queryId, Principal user, Map<String, String> headers, String apiVer, String apiQuery) { synchronized (this) { long start = System.currentTimeMillis(); startTime.put(queryId, start); } log.info("Accepted Query with RequestId: " + queryId + " User: " + user + " ApiVersion: " + apiVer + " ApiQuery: " + apiQuery); }

Target:
public void acceptQuery(UUID queryId, Principal user, Map<String, String> headers, String apiVer, String apiQuery) { long start = System.currentTimeMillis(); log.debug("Accepted Query with RequestId: " + queryId + " User: " + user + " ApiVersion: " + apiVer + " ApiQuery: " + apiQuery + ". Start Time " + start); }
Source:
public ConsolePreferencesPane(UserPrefs prefs, Session session, PreferencesDialogResources res) { prefs_ = prefs; res_ = res; add(headerLabel("Display")); add(checkboxPref("Show syntax highlighting in console input", prefs_.syntaxColorConsole())); add(checkboxPref("Different color for error or message output (requires restart)", prefs_.highlightConsoleErrors())); NumericValueWidget limitLengthPref = numericPref("Limit length of lines to:", prefs_.consoleLineLengthLimit()); add(nudgeRightPlus(limitLengthPref)); consoleColorMode_ = new SelectWidget( "ANSI Escape Codes:", new String[] { "Show ANSI colors", "Remove ANSI codes", "Ignore ANSI codes (1.0 behavior)" }, new String[] { UserPrefs.ANSI_CONSOLE_MODE_ON, UserPrefs.ANSI_CONSOLE_MODE_STRIP, UserPrefs.ANSI_CONSOLE_MODE_OFF }, false, true, false); add(consoleColorMode_); if (session.getSessionInfo().getHaveSrcrefAttribute()) { Label debuggingLabel = headerLabel("Debugging"); spacedBefore(debuggingLabel); add(debuggingLabel); add(spaced(checkboxPref( "Automatically expand tracebacks in error inspector", prefs_.autoExpandErrorTracebacks(), true ))); } Label otherLabel = headerLabel("Other"); spacedBefore(otherLabel); add(otherLabel); add(spaced(checkboxPref("Double-click to select words", prefs_.consoleDoubleClickSelect()))); }

Target:
public ConsolePreferencesPane(UserPrefs prefs, Session session, PreferencesDialogResources res) { prefs_ = prefs; res_ = res; add(headerLabel("Display")); add(checkboxPref("Show syntax highlighting in console input", prefs_.syntaxColorConsole())); add(checkboxPref("Different color for error or message output (requires restart)", prefs_.highlightConsoleErrors())); NumericValueWidget limitLengthPref = numericPref("Limit output line length to:", prefs_.consoleLineLengthLimit()); add(nudgeRightPlus(limitLengthPref)); consoleColorMode_ = new SelectWidget( "ANSI Escape Codes:", new String[] { "Show ANSI colors", "Remove ANSI codes", "Ignore ANSI codes (1.0 behavior)" }, new String[] { UserPrefs.ANSI_CONSOLE_MODE_ON, UserPrefs.ANSI_CONSOLE_MODE_STRIP, UserPrefs.ANSI_CONSOLE_MODE_OFF }, false, true, false); add(consoleColorMode_); Label debuggingLabel = headerLabel("Debugging"); spacedBefore(debuggingLabel); add(debuggingLabel); add(spaced(checkboxPref( "Automatically expand tracebacks in error inspector", prefs_.autoExpandErrorTracebacks(), true ))); Label otherLabel = headerLabel("Other"); spacedBefore(otherLabel); add(otherLabel); add(spaced(checkboxPref("Double-click to select words", prefs_.consoleDoubleClickSelect()))); }
Source:
private void checkSerialVersionUID(long expectedSUID, Class<?> clazz) { assertEquals(expectedSUID, ObjectStreamClass.lookup(clazz).getSerialVersionUID()); }

Target:
private static void checkSerialVersionUID(long expectedSUID, Class<?> clazz) { assertEquals(expectedSUID, ObjectStreamClass.lookup(clazz).getSerialVersionUID()); }
Source:
public boolean containsAll(@Nullable Collection<?> c) { if (c == null) { throw new IllegalArgumentException(); } fLock.readLock().lock(); try { for (Object elem : c) { if (!this.contains(elem)) { return false; } } return true; } finally { fLock.readLock().unlock(); } }

Target:
public boolean containsAll(@Nullable Collection<?> c) { fLock.readLock().lock(); try { return fStartTimesIndex.values().containsAll(c); } finally { fLock.readLock().unlock(); } }
Source:
public boolean evaluate(final HttpServletRequest request, final HttpServletResponse response, final Instance instance) { boolean result; try { final Optional<Visitor> opt = visitorAPI.getVisitor(request); if(opt.isPresent()) { final User user = userAPI.getSystemUser(); final PageMode pageMode = PageMode.get(request); final Persona persona = pageMode.showLive? personaAPI.findLive(instance.personaId, user, false): personaAPI.find(instance.personaId, user, false); if(persona == null) { Logger.warn(PersonaActionlet.class, "Persona with id '" + instance.personaId + "' not be found. Could not execute action."); result = false; } else { opt.get().setPersona(persona); result = true; } } else { Logger.warn(PersonaActionlet.class, "No visitor was available on which to set a persona. Could not execute action."); result = false; } } catch (Exception e) { throw new RuleEvaluationFailedException(e, "Could not evaluate action %s", this.getClass().getName()); } return result; }

Target:
public boolean evaluate(final HttpServletRequest request, final HttpServletResponse response, final Instance instance) { boolean result; try { final Optional<Visitor> opt = visitorAPI.getVisitor(request); if(opt.isPresent()) { final User user = userAPI.getSystemUser(); final PageMode pageMode = PageMode.get(request); final Persona persona = pageMode.showLive? personaAPI.findLive(instance.personaId, user, pageMode.respectAnonPerms): personaAPI.find(instance.personaId, user, pageMode.respectAnonPerms); if(persona == null) { Logger.warn(PersonaActionlet.class, "Persona with id '" + instance.personaId + "' not be found. Could not execute action."); result = false; } else { opt.get().setPersona(persona); result = true; } } else { Logger.warn(PersonaActionlet.class, "No visitor was available on which to set a persona. Could not execute action."); result = false; } } catch (Exception e) { throw new RuleEvaluationFailedException(e, "Could not evaluate action %s", this.getClass().getName()); } return result; }
Source:
public synchronized void commit() throws IOException { if (logStream != null) { logStream.flush(); } for (FileOutputStream log : streamsToFlush) { log.flush(); if (forceSync) { long startSyncNS = System.nanoTime(); FileChannel channel = log.getChannel(); channel.force(false); syncElapsedMS = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startSyncNS); if (syncElapsedMS > fsyncWarningThresholdMS) { LOG.warn("fsync-ing the write ahead log (" + channel.size() + " bytes) in " + Thread.currentThread().getName() + " took " + syncElapsedMS + "ms which will adversely effect operation latency. " + "See the ZooKeeper troubleshooting guide"); } } } while (streamsToFlush.size() > 1) { streamsToFlush.removeFirst().close(); } }

Target:
public synchronized void commit() throws IOException { if (logStream != null) { logStream.flush(); } for (FileOutputStream log : streamsToFlush) { log.flush(); if (forceSync) { long startSyncNS = System.nanoTime(); FileChannel channel = log.getChannel(); channel.force(false); syncElapsedMS = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startSyncNS); if (syncElapsedMS > fsyncWarningThresholdMS) { LOG.warn("fsync-ing the write ahead log in " + Thread.currentThread().getName() + " took " + syncElapsedMS + "ms which will adversely effect operation latency. " + "File size is " + channel.size() + " bytes. " + "See the ZooKeeper troubleshooting guide"); } } } while (streamsToFlush.size() > 1) { streamsToFlush.removeFirst().close(); } }
Source:
public List<ClusterNode> mapKeyToPrimaryAndBackupsList(K key) { ctx.gateway().readLock(); try { AffinityInfo aff = cache(); return aff.assignment().get(GridAffinityProcessor.this.partition(cacheName, key, aff)); } catch (IgniteCheckedException e) { throw new IgniteException(e); } finally { ctx.gateway().readUnlock(); } }

Target:
@Override public List<ClusterNode> mapKeyToPrimaryAndBackupsList(K key) { ctx.gateway().readLock(); try { AffinityInfo aff = cache(); return aff.assignment().get(GridAffinityProcessor.this.partition(cacheName, key, aff)); } catch (IgniteCheckedException e) { throw new IgniteException(e); } finally { ctx.gateway().readUnlock(); } }
Source:
public Response validateV2SnapshotByDate( @PathParam("daterange") String daterange, @DefaultValue("false") @QueryParam("force") boolean force) throws Exception { DateUtil.DateRange dateRange = new DateUtil.DateRange(daterange); Optional<BackupVerificationResult> result = backupVerification.verifyBackup( SnapshotMetaService.BACKUP_VERSION, force, dateRange); if (!result.isPresent()) { return Response.noContent() .entity("No valid meta found for provided time range") .build(); } return Response.ok(result.get().toString()).build(); }

Target:
public Response validateV2SnapshotByDate( @PathParam("daterange") String daterange, @DefaultValue("false") @QueryParam("force") boolean force) throws Exception { DateUtil.DateRange dateRange = new DateUtil.DateRange(daterange); Optional<BackupVerificationResult> result = backupVerification.verifyBackup( BackupVersion.SNAPSHOT_META_SERVICE, force, dateRange); if (!result.isPresent()) { return Response.noContent() .entity("No valid meta found for provided time range") .build(); } return Response.ok(result.get()).build(); }
Source:
public void setProjectName(final Project.NameKey projectName) { suggestBox.setText(projectName.get()); }

Target:
public void setProjectName(final Project.NameKey projectName) { suggestBox.setText(projectName != null ? projectName.get() : ""); }
Source:
public vm_pools get(NGuid id) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() .addValue("vm_pool_id", id); ParameterizedRowMapper<vm_pools> mapper = new ParameterizedRowMapper<vm_pools>() { @Override public vm_pools mapRow(ResultSet rs, int rowNum) throws SQLException { vm_pools entity = new vm_pools(); entity.setvm_pool_description(rs .getString("vm_pool_description")); entity.setvm_pool_id(Guid.createGuidFromString(rs .getString("vm_pool_id"))); entity.setvm_pool_name(rs.getString("vm_pool_name")); entity.setvm_pool_type(VmPoolType.forValue(rs .getInt("vm_pool_type"))); entity.setparameters(rs.getString("parameters")); entity.setPrestartedVms(rs.getInt("prestarted_vms")); entity.setvds_group_id(Guid.createGuidFromString(rs .getString("vds_group_id"))); entity.setvds_group_name(rs.getString("vds_group_name")); entity.setvm_assigned_count(rs.getInt("assigned_vm_count")); entity.setvm_running_count(rs.getInt("vm_running_count")); return entity; } }; return getCallsHandler().executeRead("GetVm_poolsByvm_pool_id", mapper, parameterSource); }

Target:
public vm_pools get(NGuid id) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() .addValue("vm_pool_id", id); return getCallsHandler().executeRead("GetVm_poolsByvm_pool_id", new VmPoolRowMapper(), parameterSource); }
Source:
public String getFQDNHostname() { if (fqdnHostName == null) { if (!retrieveHostName) { fqdnHostName = inetAddress.getHostAddress(); } else { fqdnHostName = getFqdnHostName(inetAddress); } } return fqdnHostName; }

Target:
public String getFQDNHostname() { return hostNameSupplier.getFqdnHostName(); }
Source:
synchronized void connect() { RestHighLevelClient me = client; if (me == null) { synchronized (ElasticSearchAuditDestination.class) { me = client; if (client == null) { String urls = MiscUtil.getStringProperty(props, propPrefix + "." + ELASTICSEARCH_URLS); String protocol = getStringProperty(props, propPrefix + "." + ELASTICSEARCH_PROTOCOL, "http"); int port = MiscUtil.getIntProperty(props, propPrefix + "." + ELASTICSEARCH_PORT, 8080); if (urls != null) { urls = urls.trim(); } if (urls != null && urls.equalsIgnoreCase("NONE")) { urls = null; } try { me = client = new RestHighLevelClient( RestClient.builder( MiscUtil.toArray(urls, ",").stream() .map(x -> new HttpHost(x, port, protocol)) .<HttpHost>toArray(i -> new HttpHost[i]) )); ; } catch (Throwable t) { LOG.fatal("Can't connect to Solr server. urls=" + urls, t); } } } } }

Target:
synchronized void connect() { if (client == null) { synchronized (ElasticSearchAuditDestination.class) { if (client == null) { client = newClient(); } } } }
Source:
protected void createUniqueConstraintsIfMissing(DatastoreProvider provider, List<UniqueConstraintDetails> constraints) { EmbeddedNeo4jDatastoreProvider neo4jProvider = (EmbeddedNeo4jDatastoreProvider) provider; GraphDatabaseService neo4jDb = neo4jProvider.getDatabase(); Transaction tx = neo4jDb.beginTx(); if ( tx instanceof TopLevelTransaction ) { TopLevelTransaction topLevelTransaction = (TopLevelTransaction) tx; log.infof( "TopLevelTransaction topLevelTransaction : %s", topLevelTransaction.toString() ); try { Field privateTransactionField = TopLevelTransaction.class.getDeclaredField( "transaction" ); privateTransactionField.setAccessible( true ); KernelTransactionImplementation kernelTransaction = (KernelTransactionImplementation) privateTransactionField.get( topLevelTransaction ); log.infof( "kernelTransaction : %s", kernelTransaction.getTransactionId() ); } catch (IllegalStateException ise) { log.warn( "New toplevel transaction created!" ); } catch (Exception e) { log.error( "ERROR!", e ); } } else { PlaceboTransaction placeboTransaction = (PlaceboTransaction) tx; log.infof( "PlaceboTransaction placeboTransaction : %s", placeboTransaction ); try { Field privateTransactionField = PlaceboTransaction.class.getDeclaredField( "currentTransaction" ); privateTransactionField.setAccessible( true ); KernelTransactionImplementation kernelTransaction = (KernelTransactionImplementation) privateTransactionField.get( placeboTransaction ); log.infof( "kernelTransaction : %s", kernelTransaction.getTransactionId() ); } catch (IllegalStateException ise) { log.warn( "New transction created!" ); } catch (Exception e) { log.error( "ERROR!", e ); } } try { for ( UniqueConstraintDetails constraint : constraints ) { createUniqueConstraint( neo4jDb, constraint ); } tx.success(); } finally { if ( tx != null ) { tx.close(); } } }

Target:
protected void createUniqueConstraintsIfMissing(DatastoreProvider provider, List<UniqueConstraintDetails> constraints) { EmbeddedNeo4jDatastoreProvider neo4jProvider = (EmbeddedNeo4jDatastoreProvider) provider; GraphDatabaseService neo4jDb = neo4jProvider.getDatabase(); Transaction tx = neo4jDb.beginTx(); try { for ( UniqueConstraintDetails constraint : constraints ) { createUniqueConstraint( neo4jDb, constraint ); } tx.success(); } finally { if ( tx != null ) { tx.close(); } } }
Source:
public void testBadIntegerReconnectAttempts() throws Exception { try { AuditEndpoint endpoint = setupEndpointBadUdpReconnectAttempts(BAD_RECONNECT_NUMBER); Assert.fail("No error was thrown while attempting to log with an invalid reconnect-attempts number."); } catch (IllegalArgumentException e) { assertCorrectError(e, new String[] {"ELY00011008", Integer.toString(BAD_RECONNECT_NUMBER)}); } }

Target:
public void testBadIntegerReconnectAttempts() throws Exception { try { AuditEndpoint endpoint = setupEndpointBadUdpReconnectAttempts(BAD_RECONNECT_NUMBER); Assert.fail("No error was thrown while attempting to log with an invalid reconnect-attempts number."); } catch (IllegalArgumentException e) { assertCorrectError(e, new String[] {"ELY12000", Integer.toString(BAD_RECONNECT_NUMBER)}); } }
Source:
private void waitForCommitterToComplete( @Nullable TableReference tableRef, Iterable<Long> startTimestamps) { Timer.Context timer = getTimer("waitForCommitTsMillis").time(); waitForCommitToComplete(startTimestamps); long waitForCommitTsMillis = TimeUnit.NANOSECONDS.toMillis(timer.stop()); if (tableRef != null) { perfLogger.debug("Waited get commit timestamps.", SafeArg.of("commitTsMillis", waitForCommitTsMillis), LoggingArgs.tableRef(tableRef)); } else { perfLogger.debug("Waited to get commit timestamps", SafeArg.of("commitTsMillis", waitForCommitTsMillis)); } }

Target:
private void waitForCommitterToComplete( @Nullable TableReference tableRef, Iterable<Long> startTimestamps) { Timer.Context timer = getTimer("waitForCommitTsMillis").time(); waitForCommitToComplete(startTimestamps); long waitForCommitTsMillis = TimeUnit.NANOSECONDS.toMillis(timer.stop()); if (tableRef != null) { perfLogger.debug("Waited to get commit timestamps when reading from a known table.", SafeArg.of("commitTsMillis", waitForCommitTsMillis), LoggingArgs.tableRef(tableRef)); } else { perfLogger.debug("Waited to get commit timestamps.", SafeArg.of("commitTsMillis", waitForCommitTsMillis)); } }
Source:
public void review(final CertifiedProductSearchDetails listing) { for (CertificationResult cert : listing.getCertificationResults()) { if (cert.isSuccess()) { if (cert.getTestToolsUsed() != null && cert.getTestToolsUsed().size() > 0) { Iterator<CertificationResultTestTool> testToolIter = cert.getTestToolsUsed().iterator(); while (testToolIter.hasNext()) { CertificationResultTestTool testTool = testToolIter.next(); if (!StringUtils.isEmpty(testTool.getTestToolName())) { if (StringUtils.isEmpty(testTool.getTestToolVersion())) { listing.getErrorMessages() .add(msgUtil.getMessage("listing.criteria.missingTestToolVersion", testTool.getTestToolName(), cert.getNumber())); } } } } } } }

Target:
public void review(final CertifiedProductSearchDetails listing) { for (CertificationResult cert : listing.getCertificationResults()) { if (cert.isSuccess() && cert.getTestToolsUsed() != null && cert.getTestToolsUsed().size() > 0) { for (CertificationResultTestTool testTool : cert.getTestToolsUsed()) { if (!StringUtils.isEmpty(testTool.getTestToolName()) && StringUtils.isEmpty(testTool.getTestToolVersion())) { listing.getErrorMessages() .add(msgUtil.getMessage("listing.criteria.missingTestToolVersion", testTool.getTestToolName(), cert.getNumber())); } } } } }
Source:
private static boolean validateClaim(Collection<Object> values) { if (values == null || values.isEmpty()) { return false; } for (Object value : values) { if (!isValidClaimValue(value)) { return false; } } return true; }

Target:
private static boolean validateClaim(Collection<Object> values) { if (values == null) { return false; } for (Object value : values) { isValidClaimValue(value); } return true; }
Source:
private boolean matches(IService service, Class<?>[] argumentTypes) { assert service.getNumberOfParameters() != argumentTypes.length; boolean result = true; final List<IType> parameterTypes = service.getParameterTypes(queryEnvironment); for (int i = 0; i < parameterTypes.size(); i++) { if (argumentTypes[i] != null && !parameterTypes.get(i).isAssignableFrom( new ClassType(queryEnvironment, argumentTypes[i]))) { result = false; break; } } return result; }

Target:
private boolean matches(IService service, Class<?>[] argumentTypes) { assert service.getNumberOfParameters() != argumentTypes.length; boolean result = true; final List<IType> parameterTypes = service.getParameterTypes(queryEnvironment); for (int i = 0; i < parameterTypes.size() && result; i++) { if (argumentTypes[i] != null && !parameterTypes.get(i).isAssignableFrom( new ClassType(queryEnvironment, argumentTypes[i]))) { result = false; } } return result; }
Source:
protected String getAppsDirectory() { if (appsDirectory == null) return "dropins"; return appsDirectory; }

Target:
protected String getAppsDirectory() { if (appsDirectory != null && !appsDirectory.isEmpty()) return appsDirectory; boolean bAppConfigured = false; if (serverDirectory.exists()) bAppConfigured = isAppConfigInTargetServerXml(); else { File srcServerXML = getFileFromConfigDirectory("server.xml", configFile); if (srcServerXML != null && srcServerXML.exists()) bAppConfigured = isAppConfigInSourceServerXml(); } if (appsDirectory == null || appsDirectory.isEmpty()) appsDirectory = bAppConfigured ? "apps" : "dropins"; return appsDirectory; }
Source:
public List<Patient> getCachePatients() { if (null == cachePatients) { getAllPatients(); } return cachePatients; }

Target:
public List<Patient> getCachePatients() { if (null == cachePatients) { cachePatients = getAllPatients(); } return cachePatients; }
Source:
public static boolean checkSecurityInfos(String endpoint, Identity clientIdentity, List<SecurityInfo> securityInfos) { if (clientIdentity.isSecure()) { if (securityInfos == null || securityInfos.isEmpty()) { LOG.warn("A client without security info try to connect through the secure endpont", endpoint); return false; } else { for (SecurityInfo securityInfo : securityInfos) { if (checkSecurityInfo(endpoint, clientIdentity, securityInfo)) { return true; } } return false; } } else { if (securityInfos != null && !securityInfos.isEmpty()) { LOG.warn("client must connect using DTLS ", endpoint); return false; } } return true; }

Target:
public static boolean checkSecurityInfos(String endpoint, Identity clientIdentity, List<SecurityInfo> securityInfos) { if (clientIdentity.isSecure()) { if (securityInfos == null || securityInfos.isEmpty()) { LOG.warn("A client without security info try to connect through the secure endpont", endpoint); return false; } else { for (SecurityInfo securityInfo : securityInfos) { if (checkSecurityInfo(endpoint, clientIdentity, securityInfo)) { return true; } } return false; } } else if (securityInfos != null && !securityInfos.isEmpty()) { LOG.warn("client must connect using DTLS ", endpoint); return false; } return true; }
Source:
public Iterator<Object[]> getObjects(String nameJson, Class<?> elementClass) { Collection<Object[]> objectsArray = new ArrayList<>(); try { final String pathFileJson = SRC_TEST_RESOURCES_JSON.concat(nameJson); Object jsonObject = new JSONParser().parse(new FileReader(pathFileJson)); ObjectMapper objectMapper = new ObjectMapper(); List<Object> objectList = objectMapper.readValue(((JSONArray) jsonObject).toJSONString(), objectMapper.getTypeFactory().constructCollectionType(List.class, elementClass)); for (Object object : objectList) { objectsArray.add(new Object[]{object}); } } catch (IOException | ParseException e) { e.printStackTrace(); } return objectsArray.iterator(); }

Target:
public Iterator<Object[]> getObjects(String nameJson, Class<?> elementClass) { List<Object[]> objectsArray = new ArrayList<>(); try { final String pathFileJson = SRC_TEST_RESOURCES_JSON.concat(nameJson); Object jsonObject = new JSONParser().parse(new FileReader(pathFileJson)); ObjectMapper objectMapper = new ObjectMapper(); List<Object> objectList = objectMapper.readValue(((JSONArray) jsonObject).toJSONString(), objectMapper.getTypeFactory().constructCollectionType(List.class, elementClass)); for (Object object : objectList) { objectsArray.add(new Object[]{object}); } } catch (IOException | ParseException e) { e.printStackTrace(); } return objectsArray.iterator(); }
Source:
public void onItemBreak(PlayerItemBreakEvent e) { if (Talisman.checkFor(e, SlimefunItems.TALISMAN_ANVIL)) { PlayerInventory inv = e.getPlayer().getInventory(); int slot = inv.getHeldItemSlot(); if (!inv.getItem(inv.getHeldItemSlot()).equals(e.getBrokenItem())) { for (int s : armorSlots) { if (e.getBrokenItem().equalst(inv.getItem(s))) { slot = s; break; } } } ItemStack item = e.getBrokenItem().clone(); ItemMeta meta = item.getItemMeta(); if (meta instanceof Damageable) { ((Damageable) meta).setDamage(0); } item.setItemMeta(meta); int itemSlot = slot; Slimefun.runSync(() -> inv.setItem(itemSlot, item), 1L); } }

Target:
public void onItemBreak(PlayerItemBreakEvent e) { if (Talisman.checkFor(e, SlimefunItems.TALISMAN_ANVIL)) { PlayerInventory inv = e.getPlayer().getInventory(); int slot = inv.getHeldItemSlot(); if (!inv.getItem(inv.getHeldItemSlot()).equals(e.getBrokenItem())) { for (int s : armorSlots) { if (e.getBrokenItem().equals(inv.getItem(s))) { slot = s; break; } } } ItemStack item = e.getBrokenItem().clone(); ItemMeta meta = item.getItemMeta(); if (meta instanceof Damageable) { ((Damageable) meta).setDamage(0); } item.setItemMeta(meta); int itemSlot = slot; Slimefun.runSync(() -> inv.setItem(itemSlot, item), 1L); } }
Source:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); boolean previouslyStarted = prefs.getBoolean(getString(R.string.pref_previously_started), false); if(!previouslyStarted) { SharedPreferences.Editor edit = prefs.edit(); edit.putBoolean(getString(R.string.pref_previously_started), Boolean.TRUE); edit.commit(); startActivity(new Intent(MainActivity.this, AvatarRoom.class)); } ImageButton new_user = (ImageButton) findViewById(R.id.newUserButtonFirstPage); new_user.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent myIntent = new Intent(MainActivity.this, AvatarRoom.class); startActivityForResult(myIntent, 0); } }); ImageButton start = (ImageButton) findViewById(R.id.startButtonMain); start.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent myIntent = new Intent(MainActivity.this, MapActivity.class); startActivityForResult(myIntent, 0); } }); }

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); boolean previouslyStarted = prefs.getBoolean(getString(R.string.pref_previously_started), false); if (!previouslyStarted) { startActivity(new Intent(MainActivity.this, AvatarRoom.class)); } ImageButton new_user = (ImageButton) findViewById(R.id.newUserButtonFirstPage); new_user.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent myIntent = new Intent(MainActivity.this, AvatarRoom.class); startActivityForResult(myIntent, 0); } }); ImageButton start = (ImageButton) findViewById(R.id.startButtonMain); start.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent myIntent = new Intent(MainActivity.this, MapActivity.class); startActivityForResult(myIntent, 0); } }); }
Source:
public void testDefaultTypeConfig() { byte[] bytes = "<root><name>foo</name></root>".getBytes(); MessageProperties messageProperties = new MessageProperties(); messageProperties.setContentType("application/xml"); Message message = new Message(bytes, messageProperties); Object foo = xmlConverterWithDefaultType.fromMessage(message); assertTrue(foo instanceof Foo); }

Target:
public void testDefaultTypeConfig() { byte[] bytes = "<root><name>foo</name></root>".getBytes(); MessageProperties messageProperties = new MessageProperties(); messageProperties.setContentType("application/xml"); Message message = new Message(bytes, messageProperties); Object foo = xmlConverterWithDefaultType.fromMessage(message); assertThat(foo).isInstanceOf(Foo.class); }
Source:
public void doMonitor(ServiceEmitter emitter) { final CacheStats oldStats = priorStats.get(); final CacheStats newStats = cache.stats(); final CacheStats deltaStats; if (oldStats == null) { deltaStats = newStats; } else { deltaStats = newStats.minus(oldStats); } final ServiceMetricEvent.Builder builder = ServiceMetricEvent.builder(); emitter.emit(builder.build("query/cache/caffeine/delta/requests", deltaStats.requestCount())); emitter.emit(builder.build("query/cache/caffeine/total/requests", newStats.requestCount())); emitter.emit(builder.build("query/cache/caffeine/delta/loadTime", deltaStats.totalLoadTime())); emitter.emit(builder.build("query/cache/caffeine/total/loadTime", newStats.totalLoadTime())); emitter.emit(builder.build("query/cache/caffeine/delta/evictionBytes", deltaStats.evictionWeight())); emitter.emit(builder.build("query/cache/caffeine/total/evictionBytes", newStats.evictionWeight())); if (!priorStats.compareAndSet(oldStats, newStats)) { log.warn( new IllegalStateException("Multiple monitors"), "Multiple monitors on the same cache causing race conditions and unreliable stats reporting" ); } }

Target:
public void doMonitor(ServiceEmitter emitter) { final CacheStats oldStats = priorStats.get(); final CacheStats newStats = cache.stats(); final CacheStats deltaStats = newStats.minus(oldStats); final ServiceMetricEvent.Builder builder = ServiceMetricEvent.builder(); emitter.emit(builder.build("query/cache/caffeine/delta/requests", deltaStats.requestCount())); emitter.emit(builder.build("query/cache/caffeine/total/requests", newStats.requestCount())); emitter.emit(builder.build("query/cache/caffeine/delta/loadTime", deltaStats.totalLoadTime())); emitter.emit(builder.build("query/cache/caffeine/total/loadTime", newStats.totalLoadTime())); emitter.emit(builder.build("query/cache/caffeine/delta/evictionBytes", deltaStats.evictionWeight())); emitter.emit(builder.build("query/cache/caffeine/total/evictionBytes", newStats.evictionWeight())); if (!priorStats.compareAndSet(oldStats, newStats)) { log.warn( new IllegalStateException("Multiple monitors"), "Multiple monitors on the same cache causing race conditions and unreliable stats reporting" ); } }
Source:
public void deeperServiceCall() throws QueryEvaluationException { add("ontology:dummy", "ontology:dummy", "wd:Q1"); add("wd:Q1", "ontology:dummy", "wd:Q123"); addSimpleLabels("Q123"); StringBuilder query = uris().prefixes(Ontology.prefix(new StringBuilder())); query.append("SELECT ?pLabel\n"); query.append("WHERE {\n"); query.append(" ontology:dummy ontology:dummy ?s .\n"); query.append(" {\n"); query.append(" ?s ontology:dummy ?p .\n"); query.append(" SERVICE ontology:label { bd:serviceParam ontology:language \"en , de\" . }\n"); query.append(" }\n"); query.append("}\n"); BlazegraphAssertions.assertThat(query(query.toString())) .haveExactly(1, binding("pLabel", "in en", "en")); }

Target:
public void deeperServiceCall() throws QueryEvaluationException { add("ontology:dummy", "ontology:dummy", "wd:Q1"); add("wd:Q1", "ontology:dummy", "wd:Q123"); addSimpleLabels("Q123"); StringBuilder query = uris().prefixes(Ontology.prefix(new StringBuilder())); query.append("SELECT ?pLabel\n"); query.append("WHERE {\n"); query.append(" ontology:dummy ontology:dummy ?s .\n"); query.append(" {\n"); query.append(" ?s ontology:dummy ?p .\n"); query.append(" SERVICE ontology:label { bd:serviceParam ontology:language \"en , de\" . }\n"); query.append(" }\n"); query.append("}\n"); TupleQueryResult results = query(query.toString()); BlazegraphAssertions.assertThat(results) .haveExactly(1, binding("pLabel", "in en", "en")); }
Source:
private StreamTaskInput<IN> wrapWithSorted(StreamTaskInput<IN> input) { ClassLoader userCodeClassLoader = getUserCodeClassLoader(); return new SortingDataInput<>( input, configuration.getTypeSerializerIn(input.getInputIndex(), userCodeClassLoader), configuration.getStateKeySerializer(userCodeClassLoader), configuration.getStatePartitioner(input.getInputIndex(), userCodeClassLoader), getEnvironment().getMemoryManager(), getEnvironment().getIOManager(), getExecutionConfig().isObjectReuseEnabled(), 1.0, getJobConfiguration(), this ); }

Target:
private StreamTaskInput<IN> wrapWithSorted(StreamTaskInput<IN> input) { ClassLoader userCodeClassLoader = getUserCodeClassLoader(); return new SortingDataInput<>( input, configuration.getTypeSerializerIn(input.getInputIndex(), userCodeClassLoader), configuration.getStateKeySerializer(userCodeClassLoader), configuration.getStatePartitioner(input.getInputIndex(), userCodeClassLoader), getEnvironment().getMemoryManager(), getEnvironment().getIOManager(), getExecutionConfig().isObjectReuseEnabled(), configuration.getManagedMemoryFractionOperatorUseCaseOfSlot( ManagedMemoryUseCase.BATCH_OP, getTaskConfiguration() ), getJobConfiguration(), this ); }
Source:
private void validate(InstanceAdapter instanceAdapter, boolean isSyncAdapter) { if (isSyncAdapter) { throw new UnsupportedOperationException("At present, sync adapters are not expected to write to the instances table."); } if (instanceAdapter.isUpdated(InstanceAdapter._ID) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_START) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_START_SORTING) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_DUE) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_DUE_SORTING) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_ORIGINAL_TIME) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_STATUS) || instanceAdapter.isUpdated(InstanceAdapter.TASK_ID)) { throw new IllegalArgumentException("Instance columns are read-only."); } }

Target:
private void validate(InstanceAdapter instanceAdapter, boolean isSyncAdapter) { if (isSyncAdapter) { throw new UnsupportedOperationException("At present, sync adapters are not expected to write to the instances table."); } if (instanceAdapter.isUpdated(InstanceAdapter._ID) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_START) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_START_SORTING) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_DUE) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_DUE_SORTING) || instanceAdapter.isUpdated(InstanceAdapter.INSTANCE_ORIGINAL_TIME) || instanceAdapter.isUpdated(InstanceAdapter.DISTANCE_FROM_CURRENT) || instanceAdapter.isUpdated(InstanceAdapter.TASK_ID)) { throw new IllegalArgumentException("Instance columns are read-only."); } TaskAdapter taskAdapter = instanceAdapter.taskAdapter(); if (taskAdapter.isUpdated(TaskAdapter.RRULE) || taskAdapter.isUpdated(TaskAdapter.RDATE) || taskAdapter.isUpdated(TaskAdapter.EXDATE)) { throw new IllegalArgumentException("Recurrence values can not be modified through the instances table."); } }
Source:
public final File getOriginal() { File f = getFile(null); if (f != null) { File p = f.getParentFile(); if (p != null && p.exists()) { File original = null; File[] ff = p.listFiles(new OriginalFilter()); if (ff != null && ff.length > 0) { original = ff[0]; } if (original == null) { if (Type.PRESENTATION == type) { f = getFile(EXTENSION_PDF); } } else { f = original; } } } return f; }

Target:
public final File getOriginal() { File f = getFile(Type.PRESENTATION == type ? EXTENSION_PDF : null); if (f != null) { File p = f.getParentFile(); if (p != null && p.exists()) { File[] ff = p.listFiles(new OriginalFilter()); if (ff != null && ff.length > 0) { f = ff[0]; } } } return f; }
Source:
public void onClick(View view) { if (view == twitterButton) { logOutOfTwitter(); loginWithTwitter(); } else if (view == facebookButton) { logOutOfFacebook(); loginWithFacebook(); } }

Target:
public void onClick(View view) { if (view.getId() == R.id.twitter_button) { logOutOfTwitter(); loginWithTwitter(); } else if (view.getId() == R.id.facebook_button) { logOutOfFacebook(); loginWithFacebook(); } }
Source:
public boolean doBuild(TopologyBuilder bldr, Set<String> stageNames) { setDefaultNameIfNone(StreamletNamePrefix.REDUCE, stageNames); GeneralReduceByKeyAndWindowOperator<K, V, VR> bolt = new GeneralReduceByKeyAndWindowOperator<K, V, VR>(keyExtractor, identity, reduceFn); bolt.applyWindowConfig(windowCfg); bldr.setBolt(getName(), bolt, getNumPartitions()) .customGrouping(parent.getName(), parent.getStreamId(), new ReduceByKeyAndWindowCustomGrouping<K, V>(keyExtractor)); return true; }

Target:
public boolean doBuild(TopologyBuilder bldr, Set<String> stageNames) { setDefaultNameIfNone(StreamletNamePrefix.REDUCE, stageNames); GeneralReduceByKeyAndWindowOperator<K, V, VR> bolt = new GeneralReduceByKeyAndWindowOperator<K, V, VR>(keyExtractor, identity, reduceFn); windowCfg.applyTo(bolt); bldr.setBolt(getName(), bolt, getNumPartitions()) .customGrouping(parent.getName(), parent.getStreamId(), new ReduceByKeyAndWindowCustomGrouping<K, V>(keyExtractor)); return true; }
Source:
public HostGeoInfo getHostGeoInfo(InetAddress address) throws Exception { HostGeoInfo result; try { if (HOMELESS_IP.equals(address.getHostAddress())) { result = null; } else { result = delegate.getHostGeoInfo(address); } LOG.info("StubHostGeoLookup.getHostGeoInfo queried: address="+address+"; hostAddress="+address.getHostAddress()+"; result="+result); return result; } catch (Throwable t) { LOG.error("StubHostGeoLookup.getHostGeoInfo encountered problem (rethrowing): address="+address+"; hostAddress="+address.getHostAddress(), t); throw Exceptions.propagate(t); } }

Target:
public HostGeoInfo getHostGeoInfo(InetAddress address) throws Exception { try { HostGeoInfo result; if (HOMELESS_IP.equals(address.getHostAddress())) { result = null; } else { result = delegate.getHostGeoInfo(address); } LOG.info("StubHostGeoLookup.getHostGeoInfo queried: address="+address+"; hostAddress="+address.getHostAddress()+"; result="+result); return result; } catch (Throwable t) { LOG.error("StubHostGeoLookup.getHostGeoInfo encountered problem (rethrowing): address="+address+"; hostAddress="+address.getHostAddress(), t); throw Exceptions.propagate(t); } }