auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private Rule[] updateRuleTitles(Rule[] rules, Map<Rule, AtomicInteger> counters) { ArrayList<Rule> result = new ArrayList<Rule>(); for (int i = 0; i < rules.length; i++) { Rule rule = rules[i]; AtomicInteger counter = counters.get(rule); if (counter.get() == 0 && this.hideEmptyRules) { continue; } String label = LegendUtils.getRuleLabel(rule, request); if (StringUtils.isEmpty(label)) { label = "(" + counter.get() + ")"; } else { label = label + " (" + counter.get() + ")"; } TargetLabelUpdater duplicatingVisitor = new TargetLabelUpdater(label); rule.accept(duplicatingVisitor); Rule clone = (Rule) duplicatingVisitor.getCopy(); result.add(clone); } return result.toArray(new Rule[result.size()]); }

Target:
private Rule[] updateRuleTitles(Rule[] rules, Map<Rule, AtomicInteger> counters) { ArrayList<Rule> result = new ArrayList<Rule>(); for (int i = 0; i < rules.length; i++) { Rule rule = rules[i]; AtomicInteger counter = counters.get(rule); if (counter.get() == 0 && this.hideEmptyRules) { continue; } String label = LegendUtils.getRuleLabel(rule, request); if (this.countMatched) { if (StringUtils.isEmpty(label)) { label = "(" + counter.get() + ")"; } else { label = label + " (" + counter.get() + ")"; } } TargetLabelUpdater duplicatingVisitor = new TargetLabelUpdater(label); rule.accept(duplicatingVisitor); Rule clone = (Rule) duplicatingVisitor.getCopy(); result.add(clone); } return result.toArray(new Rule[result.size()]); }
Source:
public final static <T> Observable<T> mergeDelayError(Iterable<? extends Observable<? extends T>> sequences, int maxConcurrent) { return mergeDelayError(from(sequences), maxConcurrent); }

Target:
public static <T> Observable<T> mergeDelayError(Iterable<? extends Observable<? extends T>> sequences, int maxConcurrent) { return mergeDelayError(from(sequences), maxConcurrent); }
Source:
public DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec, ColumnSelectorFactory factory) { final VirtualColumn virtualColumn = getVirtualColumn(dimensionSpec.getDimension()); if (virtualColumn == null) { return dimensionSpec.decorate(ConstantDimensionSelector.of(null, dimensionSpec.getExtractionFn())); } else { final DimensionSelector selector = virtualColumn.makeDimensionSelector(dimensionSpec, factory); if (selector == null) { return dimensionSpec.decorate(ConstantDimensionSelector.of(null, dimensionSpec.getExtractionFn())); } else { return selector; } } }

Target:
public DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec, ColumnSelectorFactory factory) { final VirtualColumn virtualColumn = getVirtualColumn(dimensionSpec.getDimension()); if (virtualColumn == null) { throw new IAE("No such virtual column[%s]", dimensionSpec.getDimension()); } else { final DimensionSelector selector = virtualColumn.makeDimensionSelector(dimensionSpec, factory); Preconditions.checkNotNull(selector, "selector"); return selector; } }
Source:
public void shouldScrollIntoTerminal() throws InterruptedException { openMC("/"); try { terminal.movePageDownListTerminal("opt"); terminal.moveDownListTerminal(".dockerenv"); terminal.waitExpectedTextIntoTerminal(".dockerenv"); terminal.movePageUpListTerminal("projects"); terminal.moveUpListTerminal("bin"); terminal.waitExpectedTextIntoTerminal("bin"); } catch (TimeoutException ex) { fail("Known issue <LINK_0>"); } }

Target:
public void shouldScrollIntoTerminal() throws InterruptedException { openMC("/"); try { terminal.movePageDownListTerminal("opt"); } catch (TimeoutException ex) { fail("Known issue <LINK_0>", ex); } terminal.moveDownListTerminal(".dockerenv"); terminal.waitExpectedTextIntoTerminal(".dockerenv"); terminal.movePageUpListTerminal("projects"); terminal.moveUpListTerminal("bin"); terminal.waitExpectedTextIntoTerminal("bin"); }
Source:
public void removeAllUserFacilityAttributes(PerunSession sess, User user) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException { List<RichAttribute<User, Facility>> userFacilitiesAttributes = getAttributesManagerImpl().getAllUserFacilityRichAttributes(sess, user); getAttributesManagerImpl().removeAllUserFacilityAttributes(sess, user); log.info("{} removed all attributes from user on all facilities. User id = ", user.getId()); getPerunBl().getAuditer().log(sess, "All non-virtual user-facility attributes removed for all facilities and {}", user); for (RichAttribute<User, Facility> richAttribute : userFacilitiesAttributes) { try { checkAttributeValue(sess, richAttribute.getSecondaryHolder(), richAttribute.getPrimaryHolder(), new Attribute(richAttribute.getAttribute())); this.checkAttributeDependencies(sess, richAttribute); } catch (WrongAttributeAssignmentException ex) { throw new ConsistencyErrorException(ex); } } for (RichAttribute<User, Facility> attribute : userFacilitiesAttributes) { try { getAttributesManagerImpl().changedAttributeHook(sess, attribute.getSecondaryHolder(), attribute.getPrimaryHolder(), new Attribute(attribute.getAttribute())); } catch (WrongAttributeValueException | WrongReferenceAttributeValueException ex) { throw new InternalErrorException(ex); } } }

Target:
public void removeAllUserFacilityAttributes(PerunSession sess, User user) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException { List<RichAttribute<User, Facility>> userFacilitiesAttributes = getAttributesManagerImpl().getAllUserFacilityRichAttributes(sess, user); getAttributesManagerImpl().removeAllUserFacilityAttributes(sess, user); log.info("{} removed all attributes from user on all facilities.", sess.getLogId(), user.getId()); getPerunBl().getAuditer().log(sess, "All non-virtual user-facility attributes removed for all facilities and {}", user); for (RichAttribute<User, Facility> richAttribute : userFacilitiesAttributes) { try { checkAttributeValue(sess, richAttribute.getSecondaryHolder(), richAttribute.getPrimaryHolder(), new Attribute(richAttribute.getAttribute())); this.checkAttributeDependencies(sess, richAttribute); } catch (WrongAttributeAssignmentException ex) { throw new ConsistencyErrorException(ex); } } for (RichAttribute<User, Facility> attribute : userFacilitiesAttributes) { try { getAttributesManagerImpl().changedAttributeHook(sess, attribute.getSecondaryHolder(), attribute.getPrimaryHolder(), new Attribute(attribute.getAttribute())); } catch (WrongAttributeValueException | WrongReferenceAttributeValueException ex) { throw new InternalErrorException(ex); } } }
Source:
private String getCitationMarkerField(BibEntry entry, BibDatabase database, String field) { String authorField = getStringCitProperty(AUTHOR_FIELD); String[] fields = field.split(FieldName.FIELD_SEPARATOR); for (String s : fields) { Objects.requireNonNull(entry, "Entry cannot be null"); Objects.requireNonNull(database, "database cannot be null"); Optional<String> content = entry.getResolvedFieldOrAlias(s, database); if ((content.isPresent()) && !content.get().trim().isEmpty()) { if (field.equals(authorField) && StringUtil.isInCurlyBrackets(content.get())) { return "{" + fieldFormatter.format(content.get()) + "}"; } return fieldFormatter.format(content.get()); } } return ""; }

Target:
private String getCitationMarkerField(BibEntry entry, BibDatabase database, String field) { Objects.requireNonNull(entry, "Entry cannot be null"); Objects.requireNonNull(database, "database cannot be null"); String authorField = getStringCitProperty(AUTHOR_FIELD); String[] fields = field.split(FieldName.FIELD_SEPARATOR); for (String s : fields) { Optional<String> content = entry.getResolvedFieldOrAlias(s, database); if ((content.isPresent()) && !content.get().trim().isEmpty()) { if (field.equals(authorField) && StringUtil.isInCurlyBrackets(content.get())) { return "{" + fieldFormatter.format(content.get()) + "}"; } return fieldFormatter.format(content.get()); } } return ""; }
Source:
public void customize() { if (downloadedFilename != null) { newScript(CUSTOMIZING) .failOnNonZeroResultCode() .environmentVariablesReset() .body.append(ArchiveUtils.extractCommands(downloadedFilename, getInstallDir())) .execute(); } else { String customizeCommand = getEntity().getConfig(VanillaSoftwareProcess.CUSTOMIZE_COMMAND); if (!StringUtils.isBlank(customizeCommand)) { newScript(CUSTOMIZING) .failOnNonZeroResultCode() .environmentVariablesReset() .body.append(customizeCommand) .execute(); } } }

Target:
public void customize() { if (downloadedFilename != null) { newScript(CUSTOMIZING) .failOnNonZeroResultCode() .environmentVariablesReset() .body.append(ArchiveUtils.extractCommands(downloadedFilename, getInstallDir())) .execute(); } String customizeCommand = getEntity().getConfig(VanillaSoftwareProcess.CUSTOMIZE_COMMAND); if (Strings.isNonBlank(customizeCommand)) { newScript(CUSTOMIZING) .failOnNonZeroResultCode() .environmentVariablesReset() .body.append(customizeCommand) .execute(); } }
Source:
private static boolean checkOrderOther(Session session, Expression expr, ArrayList<String> expressionSQL) { if (expr.isConstant()) { return true; } String exprSQL = expr.getSQL(); for (String sql: expressionSQL) { if (session.getDatabase().equalsIdentifiers(exprSQL, sql)) { return true; } } int count = expr.getSubexpressionCount(); if (expr instanceof Function ? !((Function) expr).isDeterministic() : count <= 0) { return false; } for (int i = 0; i < count; i++) { if (!checkOrderOther(session, expr.getSubexpression(i), expressionSQL)) { return false; } } return true; }

Target:
private static boolean checkOrderOther(Session session, Expression expr, ArrayList<String> expressionSQL) { if (expr.isConstant()) { return true; } String exprSQL = expr.getSQL(); for (String sql: expressionSQL) { if (session.getDatabase().equalsIdentifiers(exprSQL, sql)) { return true; } } int count = expr.getSubexpressionCount(); if (expr instanceof Function) { if (!((Function) expr).isDeterministic()) { return false; } } else if (count <= 0) { return false; } for (int i = 0; i < count; i++) { if (!checkOrderOther(session, expr.getSubexpression(i), expressionSQL)) { return false; } } return true; }
Source:
void setArguments(Object[] args) { if (args == null) { return; } int count = args.length; if (!isSynchronous) { count -= 1; } for (int i = 0; i < count; i++) { String name = paramNames[i]; Object value = args[i]; RestMethodInfo.ParamUsage paramUsage = paramUsages[i]; switch (paramUsage) { case PATH: if (value == null) { throw new IllegalArgumentException( "Path parameter \"" + name + "\" value must not be null."); } { Boolean disableUrlEncoding = paramFlags[i]; addPathParam(name, value.toString(), disableUrlEncoding); } break; case QUERY: if (value != null) { Boolean disableUrlEncoding = paramFlags[i]; addQueryParam(name, value.toString(), disableUrlEncoding); } break; case HEADER: if (value != null) { addHeader(name, value.toString()); } break; case FIELD: if (value != null) { formBody.addField(name, value.toString()); } break; case PART: if (value != null) { if (value instanceof TypedOutput) { multipartBody.addPart(name, (TypedOutput) value); } else if (value instanceof String) { multipartBody.addPart(name, new TypedString((String) value)); } else { multipartBody.addPart(name, converter.toBody(value)); } } break; case BODY: if (value == null) { throw new IllegalArgumentException("Body parameter value must not be null."); } if (value instanceof TypedOutput) { body = (TypedOutput) value; } else { body = converter.toBody(value); } break; default: throw new IllegalArgumentException("Unknown parameter usage: " + paramUsage); } } }

Target:
void setArguments(Object[] args) { if (args == null) { return; } int count = args.length; if (!isSynchronous) { count -= 1; } for (int i = 0; i < count; i++) { String name = paramNames[i]; Object value = args[i]; RestMethodInfo.ParamUsage paramUsage = paramUsages[i]; switch (paramUsage) { case PATH: if (value == null) { throw new IllegalArgumentException( "Path parameter \"" + name + "\" value must not be null."); } addPathParam(name, value.toString()); break; case ENCODED_PATH: if (value == null) { throw new IllegalArgumentException( "Path parameter \"" + name + "\" value must not be null."); } addEncodedPathParam(name, value.toString()); break; case QUERY: if (value != null) { addQueryParam(name, value.toString()); } break; case ENCODED_QUERY: if (value != null) { addEncodedQueryParam(name, value.toString()); } break; case HEADER: if (value != null) { addHeader(name, value.toString()); } break; case FIELD: if (value != null) { formBody.addField(name, value.toString()); } break; case PART: if (value != null) { if (value instanceof TypedOutput) { multipartBody.addPart(name, (TypedOutput) value); } else if (value instanceof String) { multipartBody.addPart(name, new TypedString((String) value)); } else { multipartBody.addPart(name, converter.toBody(value)); } } break; case BODY: if (value == null) { throw new IllegalArgumentException("Body parameter value must not be null."); } if (value instanceof TypedOutput) { body = (TypedOutput) value; } else { body = converter.toBody(value); } break; default: throw new IllegalArgumentException("Unknown parameter usage: " + paramUsage); } } }
Source:
public void shouldBeAbleToGetCurrentUser() { Mockito.reset(userService); final UserDetails userDetails = new UserDetails(USER_NAME, "PASSWORD", Collections.emptyList()); assertThat(userDetails.getPassword()).isNotNull(); setCurrentUserDetails(userDetails); final Response response = target().request().get(); assertThat(response).isNotNull(); assertThat(response.getStatus()).isEqualTo(HttpStatusCode.OK_200); assertThat(response.readEntity(HashMap.class)) .isNotNull() .containsKeys("createdAt", "updatedAt", "lastConnectionAt"); }

Target:
public void shouldBeAbleToGetCurrentUser() { Mockito.reset(userService); final UserDetails userDetails = new UserDetails(USER_NAME, "PASSWORD", Collections.emptyList()); assertThat(userDetails.getPassword()).isNotNull(); setCurrentUserDetails(userDetails); final Response response = target().request().get(); assertThat(response).isNotNull(); assertThat(response.getStatus()).isEqualTo(HttpStatusCode.OK_200); assertThat(response.readEntity(HashMap.class)) .isNotNull() .containsKeys("created_at", "updated_at", "last_connection_at"); }
Source:
public void init() { if (encryptJwtYN) { if (StringUtils.isBlank(encryptionPassword)) { log.error( "The value of required property is blank", ENCRYPTION_PASSWORD_PROPERTY); throw new IllegalStateException("Missing property " + ENCRYPTION_PASSWORD_PROPERTY); } else if (DEFAULT_ENCRYPTION_PASSWORD.equals(encryptionPassword)) { log.warn( "Property is using the deafult value; please change it", ENCRYPTION_PASSWORD_PROPERTY); } textEncryptor.setPassword(encryptionPassword); } }

Target:
public void init() { if (encryptJwtYN) { if (StringUtils.isBlank(encryptionPassword)) { log.error( "The value of required property is blank", ENCRYPTION_PASSWORD_PROPERTY); throw new IllegalStateException("Missing property " + ENCRYPTION_PASSWORD_PROPERTY); } else if (DEFAULT_ENCRYPTION_PASSWORD.equals(encryptionPassword)) { log.warn( "Property is using the default value; please change it", ENCRYPTION_PASSWORD_PROPERTY); } textEncryptor.setPassword(encryptionPassword); } }
Source:
private List<OzoneAcl> getAclList() { List<OzoneAcl> listOfAcls = new ArrayList<>(); listOfAcls.add(new OzoneAcl(ACLIdentityType.USER, ugi.getUserName(), userRights)); List<String> userGroups = Arrays.asList(UserGroupInformation .createRemoteUser(ugi.getUserName()).getGroupNames()); userGroups.stream().forEach((group) -> listOfAcls.add( new OzoneAcl(ACLIdentityType.GROUP, group, groupRights))); return listOfAcls; }

Target:
private List<OzoneAcl> getAclList() { return OzoneUtils.getAclList(ugi.getUserName(), ugi.getGroups(), userRights, groupRights); }
Source:
public void thingUpdated(final Thing thing, ThingTrackerEvent thingTrackerEvent) { ThingUID thingUID = thing.getUID(); if (thingUpdatedLock.contains(thingUID)) { replaceThing(getThing(thingUID), thing); } else { Lock lock1 = getLockForThing(thing.getUID()); try { lock1.lock(); replaceThing(getThing(thingUID), thing); ThingHandler thingHandler = thingHandlers.get(thing.getUID()); if (thingHandler != null) { if (ThingHandlerHelper.isHandlerInitialized(thing) || isInitializing(thing)) { safeCaller.create(thingHandler).build().thingUpdated(thing); } else { logger.debug( "Cannot notify handler about updated thing '{}', because handler is not initialized (thing must be in status UNKNOWN, ONLINE or OFFLINE). Starting handler initialization instead.", thing.getThingTypeUID()); initializeHandler(thing); } } else { registerAndInitializeHandler(thing, getThingHandlerFactory(thing)); } } finally { lock1.unlock(); } } }

Target:
public void thingUpdated(final Thing thing, ThingTrackerEvent thingTrackerEvent) { ThingUID thingUID = thing.getUID(); if (thingUpdatedLock.contains(thingUID)) { replaceThing(getThing(thingUID), thing); } else { Lock lock1 = getLockForThing(thing.getUID()); try { lock1.lock(); ThingHandler thingHandler = replaceThing(getThing(thingUID), thing); if (thingHandler != null) { if (ThingHandlerHelper.isHandlerInitialized(thing) || isInitializing(thing)) { safeCaller.create(thingHandler).build().thingUpdated(thing); } else { logger.debug( "Cannot notify handler about updated thing '{}', because handler is not initialized (thing must be in status UNKNOWN, ONLINE or OFFLINE). Starting handler initialization instead.", thing.getThingTypeUID()); initializeHandler(thing); } } else { registerAndInitializeHandler(thing, getThingHandlerFactory(thing)); } } finally { lock1.unlock(); } } }
Source:
public static boolean isEqual(Object object1, Object object2) { boolean result = false; if (object1 == object2) { result = true; } else if (object1 == null || object2 == null) { result = false; } else { if (object1.getClass().isArray()) { if (object2.getClass().isArray() && (object2.getClass() == object1.getClass())) { result = (Array.getLength(object1) == Array.getLength(object2)); if (result) { for(int i = 0, icount = Array.getLength(object1); result && (i < icount); i++) { result = isEqual(Array.get(object1, i), Array.get(object2, i)); } } } } else { int t1 = getNumericType(object1); int t2 = getNumericType(object2); if (t1 == NONNUMERIC && t2 == NONNUMERIC && (!(object1 instanceof Comparable) || !(object2 instanceof Comparable))) { result = object1.equals(object2); } else { result = compareWithConversion(object1, object2) == 0; } } } return result; }

Target:
public static boolean isEqual(Object object1, Object object2) { boolean result = false; if (object1 == object2) { result = true; } else if (object1 != null && object2 != null) { if (object1.getClass().isArray()) { if (object2.getClass().isArray() && (object2.getClass() == object1.getClass())) { result = (Array.getLength(object1) == Array.getLength(object2)); if (result) { for(int i = 0, icount = Array.getLength(object1); result && (i < icount); i++) { result = isEqual(Array.get(object1, i), Array.get(object2, i)); } } } } else { int t1 = getNumericType(object1); int t2 = getNumericType(object2); if (t1 == NONNUMERIC && t2 == NONNUMERIC && (!(object1 instanceof Comparable) || !(object2 instanceof Comparable))) { result = object1.equals(object2); } else { result = compareWithConversion(object1, object2) == 0; } } } return result; }
Source:
public void constructorShouldBePrivate() { PrivateConstructorChecker.forClass(EventStream.class).expectedTypeOfException(AssertionError.class).expectedExceptionMessage("No instances.").check(); }

Target:
public void constructorShouldBePrivate() { PrivateConstructorChecker.forClass(EventStream.class).expectedTypeOfException(IllegalStateException.class).expectedExceptionMessage("No instances!").check(); }
Source:
private PrimaryAction getPrimaryAction() { if (!userCanPublishPosts()) { return PrimaryAction.SUBMIT_FOR_REVIEW; } switch (PostStatus.fromPost(mPost)) { case SCHEDULED: return PrimaryAction.SCHEDULE; case DRAFT: return PrimaryAction.PUBLISH_NOW; case PENDING: case TRASHED: return PrimaryAction.SAVE; case PRIVATE: case PUBLISHED: case UNKNOWN: return PrimaryAction.UPDATE; } return PrimaryAction.SAVE; }

Target:
private PrimaryAction getPrimaryAction() { if (!userCanPublishPosts()) { switch (PostStatus.fromPost(mPost)) { case SCHEDULED: case DRAFT: case PENDING: case PRIVATE: case PUBLISHED: case UNKNOWN: return PrimaryAction.SUBMIT_FOR_REVIEW; case TRASHED: return PrimaryAction.SAVE; } } switch (PostStatus.fromPost(mPost)) { case SCHEDULED: return PrimaryAction.SCHEDULE; case DRAFT: return PrimaryAction.PUBLISH_NOW; case PENDING: case TRASHED: return PrimaryAction.SAVE; case PRIVATE: case PUBLISHED: case UNKNOWN: return PrimaryAction.UPDATE; } throw new IllegalStateException( "Switch in getPrimaryAction is missing a required case or the case is missing \"return\" keyword "); }
Source:
private String uriRelativeToContextRoot(HttpServletRequest request) { String uri = VRaptorRequest.stripContextPath(request.getContextPath(), request.getRequestURI()); return removeQueryStringAndJSessionId(uri); }

Target:
private String uriRelativeToContextRoot(HttpServletRequest request) { String uri = VRaptorRequest.getRelativeRequestURI(request); return removeQueryStringAndJSessionId(uri); }
Source:
public static ASTNode loadPgmAst(String content, Source source, Boolean kappize, Sort startSymbol, Context context) throws ParseFailedException { ASTNode out; org.kframework.parser.concrete.KParser.ImportTblPgm(context.kompiled); String parsed = org.kframework.parser.concrete.KParser.ParseProgramString(content, startSymbol.getName()); Document doc = XmlLoader.getXMLDoc(parsed); XmlLoader.addSource(doc.getFirstChild(), source); XmlLoader.reportErrors(doc); JavaClassesFactory.startConstruction(context); out = JavaClassesFactory.getTerm((Element) doc.getDocumentElement().getFirstChild().getNextSibling()); JavaClassesFactory.endConstruction(); out = new PriorityFilter(context).visitNode(out); out = new PreferAvoidFilter(context).visitNode(out); out = new NormalizeASTTransformer(context).visitNode(out); out = new AmbFilter(context).visitNode(out); out = new RemoveBrackets(context).visitNode(out); if (kappize) out = new FlattenTerms(context).visitNode(out); return out; }

Target:
public static ASTNode loadPgmAst(String content, Source source, Boolean kappize, Sort startSymbol, Context context) throws ParseFailedException { ASTNode out; org.kframework.parser.concrete.KParser.ImportTblPgm(context.kompiled); String parsed = org.kframework.parser.concrete.KParser.ParseProgramString(content, startSymbol.toString()); Document doc = XmlLoader.getXMLDoc(parsed); XmlLoader.addSource(doc.getFirstChild(), source); XmlLoader.reportErrors(doc); JavaClassesFactory.startConstruction(context); out = JavaClassesFactory.getTerm((Element) doc.getDocumentElement().getFirstChild().getNextSibling()); JavaClassesFactory.endConstruction(); out = new PriorityFilter(context).visitNode(out); out = new PreferAvoidFilter(context).visitNode(out); out = new NormalizeASTTransformer(context).visitNode(out); out = new AmbFilter(context).visitNode(out); out = new RemoveBrackets(context).visitNode(out); if (kappize) out = new FlattenTerms(context).visitNode(out); return out; }
Source:
public static Matrix4 createRotationMatrix(final Vector3 axis, double angle) { Matrix4 ret = new Matrix4(); return ret.setToRotation(axis, angle); }

Target:
public static Matrix4 createRotationMatrix(final Vector3 axis, double angle) { return new Matrix4().setToRotation(axis, angle); }
Source:
public boolean isDeprecated() { return deprecated; }

Target:
public boolean isDeprecated() { return this.deprecated; }
Source:
public SdkCliCommand getSdkInstallAndUpdateCommand(final String proxySettings, final List<String> components) { final StringBuilder complist = new StringBuilder(); for (final String component : components) { final String modifiedComponent = component .replaceAll("^tool$", "tools") .replaceAll("^platform-tool$", "platform-tools") .replaceAll("^addon-$", "addons-") .replaceAll("^extra-google-", "extras;google;") .replaceAll("^extra-android-", "extras;android;") .replaceAll("^addon-", "add-ons;addon-") .replaceAll("^build-tools-", "build-tools;") .replaceAll("^android-", "platforms;android-") .replaceAll("^sys-img-(.*)-android-([0-9]*)", "system-images;android-$2;default;$1") .replaceAll("^sys-img-(.*)-(.*)-([0-9]*)", "system-images;android-$3;$2;$1"); complist.append(modifiedComponent); complist.append(' '); } final String upgradeArgs = String.format("--include_obsolete %s", complist.toString().trim()); return new SdkCliCommand(Tool.SDKMANAGER, upgradeArgs); }

Target:
public SdkCliCommand getSdkInstallAndUpdateCommand(final String proxySettings, final List<String> components) { final StringBuilder complist = new StringBuilder(); for (final String component : components) { final String modifiedComponent = component .replaceAll("^tool$", "tools") .replaceAll("^platform-tool$", "platform-tools") .replaceAll("^extra-google-", "extras;google;") .replaceAll("^extra-android-", "extras;android;") .replaceAll("^addon-", "add-ons;addon-") .replaceAll("^build-tools-", "build-tools;") .replaceAll("^android-", "platforms;android-") .replaceAll("^sys-img-(.*)-android-([0-9]*)", "system-images;android-$2;default;$1") .replaceAll("^sys-img-(.*)-(.*)-([0-9]*)", "system-images;android-$3;$2;$1"); complist.append(modifiedComponent); complist.append(' '); } final String upgradeArgs = String.format("--include_obsolete %s", complist.toString().trim()); return new SdkCliCommand(Tool.SDKMANAGER, upgradeArgs); }
Source:
private static Method getSingleApplyMethod(Class lambdaFunctionInterface) { checkCondition(lambdaFunctionInterface.isAnnotationPresent(FunctionalInterface.class), COMPILER_ERROR, "Lambda function interface is required to annotated with FunctionalInterface"); List<Method> applyMethods = Arrays.stream(lambdaFunctionInterface.getMethods()) .filter(method -> method.getName().equals("apply")) .collect(toImmutableList()); checkCondition(applyMethods.size() == 1, COMPILER_ERROR, "Expect to have exact method with name 'apply' in interface " + lambdaFunctionInterface.getName()); return applyMethods.get(0); }

Target:
private static Method getSingleApplyMethod(Class lambdaFunctionInterface) { checkCondition(lambdaFunctionInterface.isAnnotationPresent(FunctionalInterface.class), COMPILER_ERROR, "Lambda function interface is required to be annotated with FunctionalInterface"); List<Method> applyMethods = Arrays.stream(lambdaFunctionInterface.getMethods()) .filter(method -> method.getName().equals("apply")) .collect(toImmutableList()); checkCondition(applyMethods.size() == 1, COMPILER_ERROR, "Expect to have exactly 1 method with name 'apply' in interface " + lambdaFunctionInterface.getName()); return applyMethods.get(0); }
Source:
public void getResourcesFromADroolsPRJWithErrorWithMavenSkip() throws Exception { System.setProperty(MAVEN_MAIN_SKIP, Boolean.TRUE.toString()); Path tmpRoot = Files.createTempDirectory("repo"); Path tmp = TestUtil.createAndCopyToDirectory(tmpRoot, "dummy", ResourcesConstants.KJAR_2_SINGLE_RESOURCES_WITH_ERROR); AFCompiler compiler = KieMavenCompilerFactory.getCompiler(KieDecorator.KIE_AFTER); WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(Paths.get(tmp.toUri())); CompilationRequest req = new DefaultCompilationRequest(mavenRepo, info, new String[]{MavenCLIArgs.INSTALL}, Boolean.FALSE); KieCompilationResponse res = (KieCompilationResponse) compiler.compile(req); TestUtil.saveMavenLogIfCompilationResponseNotSuccessfull(tmp, res, this.getClass(), testName); if (!res.isSuccessful()) { List<String> msgs = res.getMavenOutput(); for (String msg : msgs) { logger.info(msg); } } assertThat(res.isSuccessful()).isTrue(); Optional<KieModuleMetaInfo> metaDataOptional = res.getKieModuleMetaInfo(); assertThat(metaDataOptional).isPresent(); KieModuleMetaInfo kieModuleMetaInfo = metaDataOptional.get(); assertThat(kieModuleMetaInfo).isNotNull(); Map<String, Set<String>> rulesBP = kieModuleMetaInfo.getRulesByPackage(); assertThat(rulesBP).hasSize(1); Optional<KieModule> kieModuleOptional = res.getKieModule(); assertThat(kieModuleOptional).isPresent(); List<String> classloaderOptional = CompilerClassloaderUtils.getStringFromTargets(tmpRoot); assertThat(classloaderOptional).hasSize(3); TestUtil.rm(tmpRoot.toFile()); }

Target:
public void getResourcesFromADroolsPRJWithErrorWithMavenSkip() throws Exception { System.setProperty(MAVEN_MAIN_SKIP, Boolean.TRUE.toString()); Path tmpRoot = Files.createTempDirectory("repo"); Path tmp = TestUtil.createAndCopyToDirectory(tmpRoot, "dummy", ResourcesConstants.KJAR_2_SINGLE_RESOURCES_WITH_ERROR); AFCompiler compiler = KieMavenCompilerFactory.getCompiler(KieDecorator.KIE_AFTER); WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(Paths.get(tmp.toUri())); CompilationRequest req = new DefaultCompilationRequest(mavenRepo, info, new String[]{MavenCLIArgs.INSTALL}, Boolean.FALSE); KieCompilationResponse res = (KieCompilationResponse) compiler.compile(req); TestUtil.saveMavenLogIfCompilationResponseNotSuccessfull(tmp, res, this.getClass(), testName); if (!res.isSuccessful()) { List<String> msgs = res.getMavenOutput(); for (String msg : msgs) { logger.info(msg); } } assertThat(res.isSuccessful()).isTrue(); Optional<KieModuleMetaInfo> metaDataOptional = res.getKieModuleMetaInfo(); assertThat(metaDataOptional).isPresent(); KieModuleMetaInfo kieModuleMetaInfo = metaDataOptional.get(); assertThat(kieModuleMetaInfo).isNotNull(); Map<String, Set<String>> rulesBP = kieModuleMetaInfo.getRulesByPackage(); assertThat(rulesBP).hasSize(1); Optional<KieModule> kieModuleOptional = res.getKieModule(); assertThat(kieModuleOptional).isPresent(); List<String> classloaderOptional = CompilerClassloaderUtils.getStringFromTargets(tmpRoot); assertThat(classloaderOptional).hasSize(3); }
Source:
public void setUp() { mMockEapStateMachine = mock(EapStateMachine.class); mCallbackLock = new Object(); mHandlerThread = new HandlerThread(HANDLER_THREAD_NAME); mHandlerThread.start(); mCallbackHandler = new Handler(mHandlerThread.getLooper()); mCallbackFired = false; }

Target:
public void setUp() { if (Looper.myLooper() == null) Looper.prepare(); mMockEapStateMachine = mock(EapStateMachine.class); mTestLooper = new TestLooper(); mCallbackHandler = new Handler(mTestLooper.getLooper()); mCallbackFired = false; }
Source:
public static <M> Stage createStage(final AbstractViewController<M> viewBinder) { Assert.requireNonNull(viewBinder, "viewBinder"); return new DolphinStage<M>(viewBinder); }

Target:
public static final <M> Stage createStage(final AbstractViewController<M> viewBinder) { Assert.requireNonNull(viewBinder, "viewBinder"); return new DolphinStage<M>(viewBinder); }
Source:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setmDbHandler(new DatabaseHandler(this)); getmDbHandler().open(); setContentView(R.layout.gamemap); Button house = (Button) findViewById(R.id.HouseButton); house.setOnClickListener(onClickListener); Button boyfriend = (Button) findViewById(R.id.BoyfriendButton); boyfriend.setOnClickListener(onClickListener); Button hospital = (Button) findViewById(R.id.HospitalButton); hospital.setOnClickListener(onClickListener); Button school = (Button) findViewById(R.id.SchoolButton); school.setOnClickListener(onClickListener); Button storeButton = (Button) findViewById(R.id.storeButton); storeButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MapActivity.this, DressingRoomActivity.class); startActivity(intent); } }); }

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setmDbHandler(new DatabaseHandler(this)); getmDbHandler().open(); setContentView(R.layout.gamemap); Button house = (Button) findViewById(R.id.HouseButton); house.setOnClickListener(onClickListener); Button boyfriend = (Button) findViewById(R.id.BoyfriendButton); boyfriend.setOnClickListener(onClickListener); Button hospital = (Button) findViewById(R.id.HospitalButton); hospital.setOnClickListener(onClickListener); Button school = (Button) findViewById(R.id.SchoolButton); school.setOnClickListener(onClickListener); Button storeButton = (Button) findViewById(R.id.storeButton); storeButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(MapActivity.this, DressingRoomActivity.class)); } }); }
Source:
public static Integer getJsonDepth(Object o) { if (isScalarObject(o)) { return 1; } Queue<Object> q = new LinkedList<>(); int depth = 0; q.add(o); while (!q.isEmpty()) { int size = q.size(); for (int i = 0; i < size; ++i) { Object obj = q.poll(); if (obj instanceof Map) { for (Object value : ((LinkedHashMap) obj).values()) { q.add(value); } } else if (obj instanceof Collection) { for (Object value : (ArrayList) obj) { q.add(value); } } } ++depth; } return depth; }

Target:
private static Integer getJsonDepth(Object o) { if (isScalarObject(o)) { return 1; } Queue<Object> q = new LinkedList<>(); int depth = 0; q.add(o); while (!q.isEmpty()) { int size = q.size(); for (int i = 0; i < size; ++i) { Object obj = q.poll(); if (obj instanceof Map) { for (Object value : ((LinkedHashMap) obj).values()) { q.add(value); } } else if (obj instanceof Collection) { for (Object value : (Collection) obj) { q.add(value); } } } ++depth; } return depth; }
Source:
public List<? extends PartitionId> getAssignedPartitionIds() { return new ArrayList<>(assignedPartitionIds); }

Target:
public Collection<? extends PartitionId> getAssignedPartitionIds() { return Collections.unmodifiableCollection(assignedPartitionIds); }
Source:
public static boolean addHostRoute(String interfaceName, InetAddress dst, InetAddress gw) { if (dst == null) { Log.w(TAG, "addHostRoute: dst should not be null"); return false; } int prefixLength; String dstStr = dst.getHostAddress(); String gwStr = (gw != null) ? gw.getHostAddress() : null; if (dst instanceof Inet4Address) { prefixLength = 32; if (gwStr == null) { gwStr = "0.0.0.0"; } } else if (dst instanceof Inet6Address) { prefixLength = 128; if (gwStr == null) { gwStr = "::"; } } else { Log.w(TAG, "addHostRoute failure: address is neither IPv4 nor IPv6" + "(" + dst + ")"); return false; } return addRoute(interfaceName, dstStr, prefixLength, gwStr) == 0; }

Target:
public static boolean addHostRoute(String interfaceName, InetAddress dst, InetAddress gw) { if (dst == null) { Log.w(TAG, "addHostRoute: dst should not be null"); return false; } int prefixLength; String dstStr = dst.getHostAddress(); String gwStr = (gw != null) ? gw.getHostAddress() : null; if (dst instanceof Inet4Address) { prefixLength = 32; } else if (dst instanceof Inet6Address) { prefixLength = 128; } else { Log.w(TAG, "addHostRoute failure: address is neither IPv4 nor IPv6" + "(" + dst + ")"); return false; } return addRoute(interfaceName, dstStr, prefixLength, gwStr) == 0; }
Source:
public void onBlockPlaced() { determineTrackMeta(); determineMirror(); Block myBlock = getWorld().getBlock(getX(), getY(), getZ()); getWorld().notifyBlocksOfNeighborChange(getX(), getY(), getZ(), myBlock); }

Target:
public void onBlockPlaced() { determineTrackMeta(); determineMirror(); ((RailcraftTileEntity)tileEntity).notifyBlocksOfNeighborChange(); }
Source:
public List<VariantAnnotation> fetchAndCache(List<String> ids) throws ResourceMappingException { Map<String, VariantAnnotation> variantResponse = super.constructFetchedMap(ids); for (String variantId : variantResponse.keySet()) { if (variantResponse.get(variantId) == null) { VariantAnnotation variantAnnotation = new VariantAnnotation(variantId); variantResponse.put(variantId, variantAnnotation); } else { variantResponse.get(variantId).setSuccessfullyAnnotated(true); } } List<VariantAnnotation> values = new ArrayList(); for (String id : ids) { values.add(variantResponse.get(id)); } return values; }

Target:
public List<VariantAnnotation> fetchAndCache(List<String> ids) throws ResourceMappingException { Map<String, VariantAnnotation> variantResponse = this.constructFetchedMap(ids); for (String variantId : variantResponse.keySet()) { if (variantResponse.get(variantId) == null) { VariantAnnotation variantAnnotation = new VariantAnnotation(variantId); variantResponse.put(variantId, variantAnnotation); } else { variantResponse.get(variantId).setSuccessfullyAnnotated(true); } } List<VariantAnnotation> values = new ArrayList(); for (String id : ids) { values.add(variantResponse.get(id)); } return values; }
Source:
protected static UiHttpSessionHelper getHttpSessionHelper() { return HTTP_SESSION_HELPER.get(); }

Target:
protected static HttpSessionHelper getHttpSessionHelper() { return HTTP_SESSION_HELPER.get(); }
Source:
private void verifyBloomFilter(boolean mightContain) { if (!mightContain) { filtedCount++; } else { unfiltedCount++; } long now = System.currentTimeMillis(); if (verifyBloomFilterBeginTime == 0) { verifyBloomFilterBeginTime = now; } else if (now - verifyBloomFilterBeginTime > verifyBloomFilterInterval) { if (unfiltedCount > filtedCount * 4) { unloadBloomFilter(); } else { filtedCount = unfiltedCount = 0; verifyBloomFilterBeginTime = now; } } }

Target:
private void verifyBloomFilter(boolean mightContain) { if (!mightContain) { filteredCount++; } else { unfilteredCount++; } if (unfilteredCount + filteredCount > STATISTICS_BARRIER_NUM && unfilteredCount > filteredCount * 4) { unloadBloomFilter(); } }
Source:
public int hashCode() { return commit.hashCode() + otherCommit.hashCode() + submitType.hashCode() + Boolean.valueOf(contentMerge).hashCode(); }

Target:
public int hashCode() { return Objects.hashCode(commit, otherCommit, submitType, contentMerge); }
Source:
private void recordFailure(final RuleResult result, final String match) { if (reportFailureCount == -1 || result.getDetails().size() < reportFailureCount) { final Map<String, Object> m = new LinkedHashMap<>(); m.put("sequence", match); result.setValid(false); result.getDetails().add(new RuleResultDetail(ERROR_CODE, m)); } }

Target:
private void recordFailure(final RuleResult result, final String match) { if (reportAllFailures || result.getDetails().size() == 0) { final Map<String, Object> m = new LinkedHashMap<>(); m.put("sequence", match); result.setValid(false); result.getDetails().add(new RuleResultDetail(ERROR_CODE, m)); } }
Source:
public void testEvaluateUnknown() throws HiveException, IOException { RefererClassifierUDF udf = new RefererClassifierUDF(); assertEquals("Unknown referer", udf.evaluate("foo"), "unknown"); }

Target:
public void testEvaluateUnknown() throws HiveException, IOException { RefererClassifierUDF udf = new RefererClassifierUDF(); assertEquals("Unknown referer", udf.evaluate("foo"), Webrequest.REFERER_UNKNOWN); }
Source:
public void votable(String label) { if (votable == null) { votable = new HashSet<String>(); } votable.add(label); hasNonZero = 1; }

Target:
public void votable(String label) { if (votable == null) { votable = new HashSet<String>(); } votable.add(label); }
Source:
public List<Network> getAll() { try { Networks networks = getQuantumClient().execute(new ListNetworks()); return map(networks.getList()); } catch (RuntimeException e) { throw new VdcBLLException(VdcBllErrors.ENGINE, new RuntimeException(e)); } }

Target:
public List<Network> getAll() { try { Networks networks = getQuantumClient().networks().list().execute(); return map(networks.getList()); } catch (RuntimeException e) { throw new VdcBLLException(VdcBllErrors.ENGINE, new RuntimeException(e)); } }
Source:
public ResourceInfoPage openResourceInfoPage(String resourceNameToSearch) { wait.until(ExpectedConditions.visibilityOf(resourceName)); action.doubleClick(driver.findElement(By.xpath("./ span[contains(text(),'" + resourceNameToSearch + "')]"))); action.perform(); return new ResourceInfoPage(); }

Target:
public ResourceInfoPage openResourceInfoPage(String resourceNameToSearch) throws InterruptedException { waitForMaskDesappears(); WebElement resourceName = driver.findElement(By.xpath(" uiMethod.doubleClick(resourceName); return new ResourceInfoPage(); }
Source:
public Entry<K, V> next() { checkInvariants(); if (hasNext()) { current = next; next = null; return current; } else { throw new NoSuchElementException(); } }

Target:
public Entry<K, V> next() { if (hasNext()) { current = next; next = null; return current; } else { throw new NoSuchElementException(); } }
Source:
private long savePageFor(@NonNull ReadingListPage page) throws IOException, InterruptedException { PageTitle pageTitle = ReadingListPage.toPageTitle(page); Observable<retrofit2.Response<PageLead>> leadCall = reqPageLead(CacheControl.FORCE_NETWORK, OfflineCacheInterceptor.SAVE_HEADER_SAVE, pageTitle); Observable<retrofit2.Response<PageRemaining>> sectionsCall = reqPageSections(CacheControl.FORCE_NETWORK, OfflineCacheInterceptor.SAVE_HEADER_SAVE, pageTitle); return Observable .zip(leadCall, sectionsCall, (leadRsp, sectionsRsp) -> { long totalSize = 0; totalSize += responseSize(leadRsp); page.downloadProgress(LEAD_SECTION_PROGRESS); WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(page)); page.downloadProgress(SECTIONS_PROGRESS); WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(page)); totalSize += responseSize(sectionsRsp); Set<String> imageUrls = new HashSet<>(pageImageUrlParser.parse(leadRsp.body())); imageUrls.addAll(pageImageUrlParser.parse(sectionsRsp.body())); if (!TextUtils.isEmpty(leadRsp.body().getThumbUrl())) { page.thumbUrl(UriUtil.resolveProtocolRelativeUrl(pageTitle.getWikiSite(), leadRsp.body().getThumbUrl())); persistPageThumbnail(pageTitle, page.thumbUrl()); imageUrls.add(page.thumbUrl()); } page.description(leadRsp.body().getDescription()); if (Prefs.isImageDownloadEnabled()) { totalSize += reqSaveImages(page, imageUrls); } String title = pageTitle.getPrefixedText(); L.i("Saved page " + title + " (" + totalSize + ")"); return totalSize; }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .blockingFirst(); }

Target:
private long savePageFor(@NonNull ReadingListPage page) throws IOException, InterruptedException { PageTitle pageTitle = ReadingListPage.toPageTitle(page); Observable<retrofit2.Response<PageLead>> leadCall = reqPageLead(CacheControl.FORCE_NETWORK, OfflineCacheInterceptor.SAVE_HEADER_SAVE, pageTitle); Observable<retrofit2.Response<PageRemaining>> sectionsCall = reqPageSections(CacheControl.FORCE_NETWORK, OfflineCacheInterceptor.SAVE_HEADER_SAVE, pageTitle); return Observable .zip(leadCall, sectionsCall, (leadRsp, sectionsRsp) -> { long totalSize = 0; totalSize += responseSize(leadRsp); page.downloadProgress(LEAD_SECTION_PROGRESS); WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(page)); page.downloadProgress(SECTIONS_PROGRESS); WikipediaApp.getInstance().getBus().post(new PageDownloadEvent(page)); totalSize += responseSize(sectionsRsp); Set<String> imageUrls = new HashSet<>(pageImageUrlParser.parse(leadRsp.body())); imageUrls.addAll(pageImageUrlParser.parse(sectionsRsp.body())); if (!TextUtils.isEmpty(leadRsp.body().getThumbUrl())) { page.thumbUrl(UriUtil.resolveProtocolRelativeUrl(pageTitle.getWikiSite(), leadRsp.body().getThumbUrl())); persistPageThumbnail(pageTitle, page.thumbUrl()); imageUrls.add(page.thumbUrl()); } page.description(leadRsp.body().getDescription()); if (Prefs.isImageDownloadEnabled()) { totalSize += reqSaveImages(page, imageUrls); } String title = pageTitle.getPrefixedText(); L.i("Saved page " + title + " (" + totalSize + ")"); return totalSize; }) .subscribeOn(Schedulers.io()) .blockingSingle(); }
Source:
private void trim(LogFilePath srcPath, long startOffset) throws Exception { if (startOffset == srcPath.getOffset()) { return; } FileReader reader = null; FileWriter writer = null; LogFilePath dstPath = null; int copiedMessages = 0; mFileRegistry.deleteWriter(srcPath); try { reader = createReader(srcPath); LogFilePathAttributes mFilePathAttributes = new LogFilePathAttributes(mConfig); KeyValue keyVal; while ((keyVal = reader.next()) != null) { if (keyVal.getKey() >= startOffset) { if (writer == null) { String localPrefix = mConfig.getLocalPath() + '/' + IdUtil.getLocalMessageDir(); dstPath = new LogFilePath(localPrefix, srcPath.getTopic(), srcPath.getPartitions(), srcPath.getGeneration(), srcPath.getKafkaPartition(), startOffset, mFilePathAttributes.getLogFileExtension()); writer = mFileRegistry.getOrCreateWriter(dstPath, mFilePathAttributes.getCompressionCodec()); } writer.write(keyVal.getKey(), keyVal.getValue()); copiedMessages++; } } } finally { if (reader != null) { reader.close(); } } mFileRegistry.deletePath(srcPath); if (dstPath == null) { LOG.info("removed file " + srcPath.getLogFilePath()); } else { LOG.info("trimmed " + copiedMessages + " messages from " + srcPath.getLogFilePath() + " to " + dstPath.getLogFilePath() + " with start offset " + startOffset); } }

Target:
private void trim(LogFilePath srcPath, long startOffset) throws Exception { if (startOffset == srcPath.getOffset()) { return; } FileReaderWriter reader = null; FileReaderWriter writer = null; LogFilePath dstPath = null; int copiedMessages = 0; mFileRegistry.deleteWriter(srcPath); try { CompressionCodec codec = null; String extension = ""; if (mConfig.getCompressionCodec() != null && !mConfig.getCompressionCodec().isEmpty()) { codec = CompressionUtil.createCompressionCodec(mConfig.getCompressionCodec()); extension = codec.getDefaultExtension(); } reader = createReader(srcPath, codec); KeyValue keyVal; while ((keyVal = reader.next()) != null) { if (keyVal.getKey() >= startOffset) { if (writer == null) { String localPrefix = mConfig.getLocalPath() + '/' + IdUtil.getLocalMessageDir(); dstPath = new LogFilePath(localPrefix, srcPath.getTopic(), srcPath.getPartitions(), srcPath.getGeneration(), srcPath.getKafkaPartition(), startOffset, extension); writer = mFileRegistry.getOrCreateWriter(dstPath, codec); } writer.write(keyVal); copiedMessages++; } } } finally { if (reader != null) { reader.close(); } } mFileRegistry.deletePath(srcPath); if (dstPath == null) { LOG.info("removed file " + srcPath.getLogFilePath()); } else { LOG.info("trimmed " + copiedMessages + " messages from " + srcPath.getLogFilePath() + " to " + dstPath.getLogFilePath() + " with start offset " + startOffset); } }
Source:
public ConsumerGroupMetadata groupMetadata() { return new ConsumerGroupMetadata(groupMetadata); }

Target:
public ConsumerGroupMetadata groupMetadata() { return groupMetadata; }
Source:
public void start() throws Exception { LOG.info("Starting split enumerator."); enumerator.start(); started = true; }

Target:
public void start() throws Exception { LOG.info("Starting split enumerator for source {}.", operatorName); enumerator.start(); started = true; }
Source:
protected void configure() { this.bind(Timer.StaticInterface.class).to(MockTimer.class); this.bind(WPIFactory.class).to(MockWPIFactory.class); this.bind(ITableProxy.class).to(TableProxy.class).in(Singleton.class); if(this.useRealDatabaseForPropertyStorage) { this.bind(PermanentStorage.class).to(OffRobotDatabaseStorage.class).in(Singleton.class); } else { this.bind(PermanentStorage.class).to(MockPermamentStorage.class).in(Singleton.class); } this.bind(SmartDashboardCommandPutter.class).to(MockSmartDashboardCommandPutter.class); this.bind(RobotAssertionManager.class).to(LoudRobotAssertionManager.class); }

Target:
protected void configure() { this.bind(Timer.StaticInterface.class).to(MockTimer.class); this.bind(WPIFactory.class).to(MockWPIFactory.class); this.bind(ITableProxy.class).to(TableProxy.class).in(Singleton.class); Class<? extends PermanentStorage> permanentStorageClass = null; if(this.useRealDatabaseForPropertyStorage) { permanentStorageClass = OffRobotDatabaseStorage.class; } else { permanentStorageClass = MockPermamentStorage.class; } this.bind(PermanentStorage.class).to(permanentStorageClass).in(Singleton.class); this.bind(SmartDashboardCommandPutter.class).to(MockSmartDashboardCommandPutter.class); this.bind(RobotAssertionManager.class).to(LoudRobotAssertionManager.class); }