auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAlterReplicaLogDirsSuccess() throws Exception { Node node0 = new Node(0, "localhost", 8120); Node node1 = new Node(1, "localhost", 8121); try (AdminClientUnitTestEnv env = mockClientEnv()) { createAlterLogDirsResponse(env, node0, Errors.NONE, 0); createAlterLogDirsResponse(env, node1, Errors.NONE, 0); TopicPartitionReplica tpr0 = new TopicPartitionReplica("topic", 0, 0); TopicPartitionReplica tpr1 = new TopicPartitionReplica("topic", 0, 1); Map<TopicPartitionReplica, String> logDirs = new HashMap<>(); logDirs.put(tpr0, "/data0"); logDirs.put(tpr1, "/data1"); AlterReplicaLogDirsResult result = env.adminClient().alterReplicaLogDirs(logDirs); result.values().get(tpr0).get(); result.values().get(tpr1).get(); } }

Target:
public void testAlterReplicaLogDirsSuccess() throws Exception { try (AdminClientUnitTestEnv env = mockClientEnv()) { createAlterLogDirsResponse(env, env.cluster().nodeById(0), Errors.NONE, 0); createAlterLogDirsResponse(env, env.cluster().nodeById(1), Errors.NONE, 0); TopicPartitionReplica tpr0 = new TopicPartitionReplica("topic", 0, 0); TopicPartitionReplica tpr1 = new TopicPartitionReplica("topic", 0, 1); Map<TopicPartitionReplica, String> logDirs = new HashMap<>(); logDirs.put(tpr0, "/data0"); logDirs.put(tpr1, "/data1"); AlterReplicaLogDirsResult result = env.adminClient().alterReplicaLogDirs(logDirs); assertNull(result.values().get(tpr0).get()); assertNull(result.values().get(tpr1).get()); } }
Source:
public Optional<Axis> toAxis() { switch ((BlockLog.EnumAxis) (Object) this) { case X: return Optional.of(Axis.X); case Y: return Optional.of(Axis.Y); case Z: return Optional.of(Axis.Z); default: return Optional.empty(); } }

Target:
public Optional<Axis> toAxis() { return Constants.DirectionFunctions.convertLogAxisToSponge((BlockLog.EnumAxis) (Object) this); }
Source:
public void testService() throws Exception { HttpClient http = (HttpClient) Runtime.start("http", "HttpClient"); http.attach(catcher); catcher.clear(); String data = http.get("<LINK_0>"); log.info(data); Message msg = catcher.getMsg(1000); assertNotNull("msg from get is null", msg); assertTrue("didn't get HttpData", HttpData.class.equals(msg.data[0].getClass())); assertTrue("response code != 200", ((HttpData) (msg.data[0])).responseCode == 200); http.postForm("<LINK_2>", "foo1", "bar1", "foo2", "bar2", "foo3", "bar with spaces"); log.info(data); data = http.get("<LINK_6>"); log.info(data); String response = http.post("<LINK_1>"); log.info(response); response = http.post("<LINK_1>"); log.info(response); response = http.get("<LINK_5>"); log.info(response); String json = http.get("<LINK_3>"); log.info(json); http.detach(catcher); }

Target:
public void testService() throws Exception { if (hasInternet()) { TestCatcher catcher = (TestCatcher) Runtime.start("catcher", "TestCatcher"); HttpClient http = (HttpClient) Runtime.start("http", "HttpClient"); http.attach(catcher); catcher.clear(); String data = http.get("<LINK_0>"); log.info(data); Message msg = catcher.getMsg(1000); assertNotNull("msg from get is null", msg); assertTrue("didn't get HttpData", HttpData.class.equals(msg.data[0].getClass())); assertTrue("response code != 200", ((HttpData) (msg.data[0])).responseCode == 200); http.postForm("<LINK_2>", "foo1", "bar1", "foo2", "bar2", "foo3", "bar with spaces"); log.info(data); data = http.get("<LINK_6>"); log.info(data); String response = http.post("<LINK_1>"); log.info(response); response = http.post("<LINK_1>"); log.info(response); response = http.get("<LINK_5>"); log.info(response); http.detach(catcher); } }
Source:
public URLClassLoader loadDependencies() { URL[] dependencies = launchDependencies.toArray(new URL[launchDependencies.size()]); ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader cl = URLClassLoader.newInstance(dependencies, currentContextClassLoader); Thread.currentThread().setContextClassLoader(cl); StringCodecs.check(); return cl; }

Target:
public URLClassLoader loadDependencies() { if (this.loaderThread == null && this.initialClassLoader == null) { this.loaderThread = Thread.currentThread(); this.initialClassLoader = Thread.currentThread().getContextClassLoader(); } if (Thread.currentThread() != this.loaderThread) { throw new RuntimeException("Calls to loadDependencies can only be made on the same thread that loadDependencies was called on for the first time"); } else { URL[] dependencies = launchDependencies.toArray(new URL[launchDependencies.size()]); ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader cl = URLClassLoader.newInstance(dependencies, currentContextClassLoader); Thread.currentThread().setContextClassLoader(cl); StringCodecs.check(); return cl; } }
Source:
boolean isHandleWritable() { return !getLedgerMetadata().isClosed(); }

Target:
protected boolean isHandleWritable() { return !getLedgerMetadata().isClosed(); }
Source:
public static DataIndexer getDataIndexer(TrainingParameters parameters,Map<String,String> reportMap) { String indexerKey = parameters.getStringParameter(AbstractEventTrainer.DATA_INDEXER_PARAM, AbstractEventTrainer.DATA_INDEXER_TWO_PASS_VALUE); if (reportMap == null) reportMap = new HashMap<>(); if (_indexers.containsKey(indexerKey)) { Class<? extends DataIndexer> type = _indexers.get(indexerKey); DataIndexer indexer; try { indexer = type.newInstance(); } catch (Exception e) { String msg = "Could not instantiate the indexer " + type.getCanonicalName() + ". The initialization threw an exception."; System.err.println(msg); e.printStackTrace(); throw new IllegalArgumentException(msg, e); } indexer.init(parameters, reportMap); return indexer; } DataIndexer indexer = ExtensionLoader.instantiateExtension(DataIndexer.class, indexerKey); indexer.init(parameters, reportMap); return indexer; }

Target:
public static DataIndexer getDataIndexer(TrainingParameters parameters,Map<String,String> reportMap) { String indexerParam = parameters.getStringParameter(AbstractEventTrainer.DATA_INDEXER_PARAM, AbstractEventTrainer.DATA_INDEXER_TWO_PASS_VALUE); if (reportMap == null) reportMap = new HashMap<>(); DataIndexer indexer = null; switch (indexerParam) { case AbstractEventTrainer.DATA_INDEXER_ONE_PASS_VALUE : indexer = new OnePassDataIndexer(); break; case AbstractEventTrainer.DATA_INDEXER_TWO_PASS_VALUE : indexer = new TwoPassDataIndexer(); break; case AbstractEventTrainer.DATA_INDEXER_ONE_PASS_REAL_VALUE : indexer = new OnePassRealValueDataIndexer(); break; default: indexer = ExtensionLoader.instantiateExtension(DataIndexer.class, indexerParam); } indexer.init(parameters, reportMap); return indexer; }
Source:
void onCanvasElementSelectedEvent(@Observes CanvasElementSelectedEvent event) { checkNotNull("event", event); final String uuid = event.getElementUUID(); if (isSameCanvas(event) && isRegistered(uuid)) { final HasControlPoints<?> hasControlPoints = getControlPointsInstance(uuid); if (!hasControlPoints.areControlsVisible()) { showCPs(hasControlPoints); } else { hideCPs(hasControlPoints); } } }

Target:
private void onCanvasElementSelectedEvent(@Observes CanvasElementSelectedEvent event) { checkNotNull("event", event); final String uuid = event.getElementUUID(); if (isSameCanvas(event) && isRegistered(uuid)) { final HasControlPoints<?> hasControlPoints = getControlPointsInstance(uuid); if (!hasControlPoints.areControlsVisible()) { showCPs(hasControlPoints); } else { hideCPs(hasControlPoints); } } }
Source:
private static void matchDns(String name, X509Certificate cert) throws CertificateException { Collection<List<?>> subjAltNames = cert.getSubjectAlternativeNames(); if (subjAltNames != null) { List<String> nonMatchingDnsAltnames = new LinkedList<>(); for (List<?> san : subjAltNames) { if (((Integer) san.get(0)).intValue() != ALTNAME_DNS) { continue; } String dnsName = (String) san.get(1); if (matchesPerRfc2818(name, dnsName)) { return; } else { nonMatchingDnsAltnames.add(dnsName); } } if (!nonMatchingDnsAltnames.isEmpty()) { StringBuilder sb = new StringBuilder("No subject alternative DNS name matching " + name + " found. Tried: "); for (String nonMatchingDnsAltname : nonMatchingDnsAltnames) { sb.append(nonMatchingDnsAltname).append(","); } throw new CertificateException(sb.toString()); } } try { LdapName dn = new LdapName(cert.getSubjectX500Principal().getName()); for (Rdn rdn : dn.getRdns()) { if (rdn.getType().equalsIgnoreCase("CN")) { if (matchesPerRfc2818(name, rdn.getValue().toString())) { return; } break; } } } catch (Exception e) { LOGGER.warning("Invalid DN: " + e.getMessage()); } throw new CertificateException("No name matching " + name + " found"); }

Target:
private static void matchDns(String name, X509Certificate cert) throws CertificateException { Collection<List<?>> subjAltNames = cert.getSubjectAlternativeNames(); if (subjAltNames != null) { List<String> nonMatchingDnsAltnames = new LinkedList<>(); for (List<?> san : subjAltNames) { if (((Integer) san.get(0)).intValue() != ALTNAME_DNS) { continue; } String dnsName = (String) san.get(1); if (matchesPerRfc2818(name, dnsName)) { return; } else { nonMatchingDnsAltnames.add(dnsName); } } if (!nonMatchingDnsAltnames.isEmpty()) { StringBuilder sb = new StringBuilder("No subject alternative DNS name matching " + name + " found. Tried: "); for (String nonMatchingDnsAltname : nonMatchingDnsAltnames) { sb.append(nonMatchingDnsAltname).append(","); } throw new CertificateException(sb.toString()); } } LdapName dn = null; try { dn = new LdapName(cert.getSubjectX500Principal().getName()); } catch (InvalidNameException e) { LOGGER.warning("Invalid DN: " + e.getMessage()); } if (dn != null) { for (Rdn rdn : dn.getRdns()) { if (rdn.getType().equalsIgnoreCase("CN")) { if (matchesPerRfc2818(name, rdn.getValue().toString())) { return; } break; } } } throw new CertificateException("No name matching " + name + " found"); }
Source:
public void testStateChangeWithUnknownInstance() throws InterruptedException { AgentMessageProcessor processor = (AgentMessageProcessor) this.agent.getMessagingClient().getMessageProcessor(); Instance inst = new Instance( "inst" ).status( InstanceStatus.DEPLOYED_STOPPED ).component( new Component( "unknown" )); processor.processMessage( new MsgCmdChangeInstanceState( inst, InstanceStatus.DEPLOYED_STARTED )); Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, inst.getStatus()); processor.scopedInstance = new TestApplicationTemplate().getMySqlVm(); processor.processMessage( new MsgCmdChangeInstanceState( inst, InstanceStatus.DEPLOYED_STARTED )); Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, inst.getStatus()); }

Target:
public void testStateChangeWithUnknownInstance() { AgentMessageProcessor processor = (AgentMessageProcessor) this.agent.getMessagingClient().getMessageProcessor(); Instance inst = new Instance( "inst" ).status( InstanceStatus.DEPLOYED_STOPPED ).component( new Component( "unknown" )); processor.processMessage( new MsgCmdChangeInstanceState( inst, InstanceStatus.DEPLOYED_STARTED )); Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, inst.getStatus()); processor.scopedInstance = new TestApplicationTemplate().getMySqlVm(); processor.processMessage( new MsgCmdChangeInstanceState( inst, InstanceStatus.DEPLOYED_STARTED )); Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, inst.getStatus()); }
Source:
public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof CompoundObjectId)) { return false; } CompoundObjectId compoundObjectId = (CompoundObjectId)object; if (this.id.keySet().size() != compoundObjectId.size()) { return false; } for (Map.Entry<String, Object> entry : ((Map<String, Object>)compoundObjectId.get()).entrySet()) { String entryKey = entry.getKey(); Object entryValue = entry.getValue(); if (entryValue == null) { if (this.id.get(entryKey) != null || !this.id.containsKey(entryKey)) { return false; } } else { if (!this.id.get(entryKey).equals(entryValue)) { return false; } } } return true; }

Target:
public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof CompoundObjectId)) { return false; } return id.equals(((CompoundObjectId)object).id); }
Source:
protected void executeVdsBrokerCommand() { _result = getBroker().getStorageDomainStats(getParameters().getStorageDomainId().toString()); proceedProxyReturnValue(); StorageDomain domain = buildStorageDynamicFromXmlRpcStruct(_result.storageStats); domain.setId(getParameters().getStorageDomainId()); setReturnValue(domain); }

Target:
protected void executeVdsBrokerCommand() { result = getBroker().getStorageDomainStats(getParameters().getStorageDomainId().toString()); proceedProxyReturnValue(); StorageDomain domain = buildStorageDynamicFromXmlRpcStruct(result.storageStats); domain.setId(getParameters().getStorageDomainId()); setReturnValue(domain); }
Source:
public Metacard toQueryTemplateMetacard(Map<String, Object> formTemplate) { Map<String, Object> filterJson = (Map) formTemplate.get("filterTemplate"); String title = (String) formTemplate.get("title"); String description = (String) formTemplate.get("description"); TransformVisitor<JAXBElement> visitor = new TransformVisitor<>(new XmlModelBuilder()); try { VisitableJsonElementImpl.create(new FilterNodeMapImpl(filterJson)).accept(visitor); JAXBElement filter = visitor.getResult(); if (!filter.getDeclaredType().equals(FilterType.class)) { LOGGER.error( "Error occurred during filter processing, root type should be a but was {}", FilterType.class.getName(), filter.getDeclaredType().getName()); return null; } String id = (String) formTemplate.get("id"); QueryTemplateMetacard metacard = (id == null) ? new QueryTemplateMetacard(title, description) : new QueryTemplateMetacard(title, description, id); String filterXml = writer.marshal(filter); metacard.setFormsFilter(filterXml); Map<String, Object> querySettings = (Map<String, Object>) formTemplate.get("querySettings"); if (querySettings != null) { metacard.setQuerySettings(querySettings); } return metacard; } catch (JAXBException e) { LOGGER.error("XML generation failed for query template metacard's filter", e); } catch (FilterProcessingException e) { LOGGER.error("Could not use filter JSON for template - {}", e.getMessage()); } return null; }

Target:
public Metacard toQueryTemplateMetacard(Map<String, Object> formTemplate) { Map<String, Object> filterJson = (Map) formTemplate.get("filterTemplate"); String title = (String) formTemplate.get("title"); String description = (String) formTemplate.get("description"); if (filterJson == null) { return null; } TransformVisitor<JAXBElement> visitor = new TransformVisitor<>(new XmlModelBuilder()); try { VisitableJsonElementImpl.create(new FilterNodeMapImpl(filterJson)).accept(visitor); JAXBElement filter = visitor.getResult(); if (!filter.getDeclaredType().equals(FilterType.class)) { LOGGER.error( "Error occurred during filter processing, root type should be a but was {}", FilterType.class.getName(), filter.getDeclaredType().getName()); return null; } String id = (String) formTemplate.get("id"); QueryTemplateMetacard metacard = (id == null) ? new QueryTemplateMetacard(title, description) : new QueryTemplateMetacard(title, description, id); String filterXml = writer.marshal(filter); metacard.setFormsFilter(filterXml); Map<String, Object> querySettings = (Map<String, Object>) formTemplate.get("querySettings"); if (querySettings != null) { metacard.setQuerySettings(querySettings); } return metacard; } catch (JAXBException e) { LOGGER.error("XML generation failed for query template metacard's filter", e); } catch (FilterProcessingException e) { LOGGER.error("Could not use filter JSON for template - {}", e.getMessage()); } return null; }
Source:
public void test() { connect(); sendKeys(jq("$d1").toWidget().$n("real"), "Aug 32, 2018"); waitResponse(); click(jq("body")); waitResponse(true); Assert.assertEquals("Sep 1, 2018", jq("$d1").toWidget().$n("real").get("value")); sendKeys(jq("$d2").toWidget().$n("real"), "Aug 32, 2018"); waitResponse(); click(jq("body")); waitResponse(); Assert.assertTrue(jq(".z-errorbox").exists()); click(jq("body")); waitResponse(); sendKeys(jq("$d2").toWidget().$n("real"), "Feb 30, 2018"); waitResponse(); click(jq("body")); waitResponse(); Assert.assertTrue(jq(".z-errorbox").exists()); click(jq("body")); waitResponse(); sendKeys(jq("$d2").toWidget().$n("real"), "Feb 0, 2018"); waitResponse(); click(jq("body")); waitResponse(); Assert.assertTrue(jq(".z-errorbox").exists()); }

Target:
public void test() { connect(); JQuery dummyButton = jq("$dummy"); sendKeys(jq("$d1").toWidget().$n("real"), "Aug 32, 2018"); waitResponse(); click(dummyButton); waitResponse(); Assert.assertEquals("Sep 1, 2018", jq("$d1").toWidget().$n("real").get("value")); sendKeys(jq("$d2").toWidget().$n("real"), "Aug 32, 2018"); waitResponse(); click(dummyButton); waitResponse(); Assert.assertTrue(jq(".z-errorbox").exists()); sendKeys(jq("$d2").toWidget().$n("real"), "Feb 30, 2018"); waitResponse(); click(dummyButton); waitResponse(); Assert.assertTrue(jq(".z-errorbox").exists()); sendKeys(jq("$d2").toWidget().$n("real"), "Feb 0, 2018"); waitResponse(); click(dummyButton); waitResponse(); Assert.assertTrue(jq(".z-errorbox").exists()); }
Source:
public byte[] signJWT(String assertion) throws APIManagementException { PrivateKey privateKey; KeyStoreManager tenantKSM = KeyStoreManager.getInstance(MultitenantConstants.SUPER_TENANT_ID); try { privateKey = tenantKSM.getDefaultPrivateKey(); } catch (Exception e) { String msg = "Error while obtaining private key for super tenant"; log.error("Error while obtaining private key for super tenant", e); throw new APIManagementException(msg, e); } return APIUtil.signJwt(assertion, privateKey, signatureAlgorithm); }

Target:
public byte[] signJWT(String assertion) throws APIManagementException { PrivateKey privateKey; KeyStoreManager superTenantKSM = KeyStoreManager.getInstance(MultitenantConstants.SUPER_TENANT_ID); try { privateKey = superTenantKSM.getDefaultPrivateKey(); } catch (Exception e) { String msg = "Error while obtaining private key for super tenant"; log.error(msg, e); throw new APIManagementException(msg, e); } return APIUtil.signJwt(assertion, privateKey, signatureAlgorithm); }
Source:
public void process(Exchange exchange) throws Exception { final Message in = exchange.getIn(); String binaryUri = (String) in.getHeader(FCREPO_URI); String binaryPath = (String) in.getHeader(CdrBinaryPath); String binarySubPath = (String) in.getHeader(CdrBinarySubPath); String text; try { text = extractText(binaryPath); } catch (TikaException e) { log.error("Failed to extract text for due to parsing error", binaryUri, e); return; } String filepath = derivativeBasePath + "/" + binarySubPath + ".txt"; File derivative = new File(filepath); File parentDir = derivative.getParentFile(); if (parentDir != null) { parentDir.mkdirs(); } try (PrintWriter fulltext = new PrintWriter(filepath)) { fulltext.println(text); } }

Target:
public void process(Exchange exchange) throws Exception { final Message in = exchange.getIn(); String binaryUri = (String) in.getHeader(FCREPO_URI); String binaryPath = (String) in.getHeader(CdrBinaryPath); String binaryId = PIDs.get(binaryUri).getId(); String binarySubPath = RepositoryPaths .idToPath(binaryId, HASHED_PATH_DEPTH, HASHED_PATH_SIZE); String text; try { text = extractText(binaryPath); } catch (TikaException e) { log.error("Failed to extract text for due to parsing error", binaryUri, e); return; } Path derivativePath = Paths.get(derivativeBasePath, binarySubPath + "/" + binaryId + ".txt"); File derivative = derivativePath.toFile(); File parentDir = derivative.getParentFile(); if (parentDir != null && !parentDir.mkdirs()) { throw new IOException("Failed to create parent directories for " + derivativePath); } try (PrintWriter fulltext = new PrintWriter(derivativePath.toString())) { fulltext.println(text); } }
Source:
public Path createCourseFolder(Path path, String folderName) { if (!isNullOrEmpty(folderName)) { path = path.resolve(folderName); } if (!Files.exists(path)) { path.toFile().mkdirs(); } return path; }

Target:
public Path createCourseFolder(Path path, String folderName) throws IOException{ if (!isNullOrEmpty(folderName)) { path = path.resolve(folderName); } if (Files.notExists(path)) { Files.createDirectories(path); } return path; }
Source:
private void handleRefreshCapabilitiesResponse(VDS vds, VDSReturnValue caps, boolean throwException) { try { invokeGetHardwareInfo(vds, caps); processRefreshCapabilitiesResponse(new AtomicBoolean(), vds, vds.clone(), caps); } catch (Throwable t) { logRefreshCapabilitiesFailure(t); if (throwException) { throw t; } } finally { if (vds != null) { updateDynamicData(vds.getDynamicData()); updateNumaData(vds); updateStaticData(vds.getStaticData()); monitoringStrategy.processHardwareCapabilities(vds); resourceManager.getEventListener().handleVdsVersion(vds.getId()); } } }

Target:
private void handleRefreshCapabilitiesResponse(VDS vds, VDSReturnValue caps, boolean throwException) { try { invokeGetHardwareInfo(vds, caps); processRefreshCapabilitiesResponse(new AtomicBoolean(), vds, vds.clone(), caps); } catch (Throwable t) { logRefreshCapabilitiesFailure(t); if (throwException) { throw t; } } finally { if (vds != null) { updateDynamicData(vds.getDynamicData()); updateNumaData(vds); maybeUpdateStaticData(vds.getStaticData()); monitoringStrategy.processHardwareCapabilities(vds); resourceManager.getEventListener().handleVdsVersion(vds.getId()); } } }
Source:
private InnerBuilder() { this.cepInputType = cepInputType; this.cepInputConfiguration = new HashMap<>(); this.fields = new ArrayList<>(); this.propertyNames = new HashSet<>(); }

Target:
private InnerBuilder() { this.cepInputType = null; this.cepInputConfiguration = new HashMap<>(); this.fields = new ArrayList<>(); this.propertyNames = new HashSet<>(); }
Source:
public void cloneSupported() { HtmlDocumentHandler documentHandler = new HtmlDocumentHandler() { @Override public void endDocument(HtmlDocumentBuilder builder, XmlStreamWriter writer) { } @Override public void beginDocument(HtmlDocumentBuilder builder, XmlStreamWriter writer) { } }; HtmlSubsetLanguage language = new HtmlSubsetLanguage("Test", documentHandler, 6, Sets.newHashSet(BlockType.PARAGRAPH, BlockType.DIV, BlockType.QUOTE), Sets.newHashSet(SpanType.CITATION, SpanType.EMPHASIS), ImmutableMap.of(SpanType.ITALIC, "italic"), Collections.<SpanHtmlElementStrategy> emptyList()); HtmlSubsetLanguage cloned = language.clone(); assertEquals(language.getName(), cloned.getName()); assertEquals(language.getSupportedBlockTypes(), cloned.getSupportedBlockTypes()); assertEquals(language.getSupportedHeadingLevel(), cloned.getSupportedHeadingLevel()); assertEquals(language.getSupportedSpanTypes(), cloned.getSupportedSpanTypes()); }

Target:
public void cloneSupported() { HtmlDocumentHandler documentHandler = new HtmlDocumentHandler() { @Override public void endDocument(HtmlDocumentBuilder builder, XmlStreamWriter writer) { } @Override public void beginDocument(HtmlDocumentBuilder builder, XmlStreamWriter writer) { } }; HtmlSubsetLanguage language = new HtmlSubsetLanguage("Test", documentHandler, 6, Sets.newHashSet(BlockType.PARAGRAPH, BlockType.DIV, BlockType.QUOTE), Sets.newHashSet(SpanType.CITATION, SpanType.EMPHASIS), ImmutableMap.of(SpanType.BOLD, "new-bold"), Collections.<SpanHtmlElementStrategy> emptyList()); HtmlSubsetLanguage cloned = language.clone(); assertEquals(language.getName(), cloned.getName()); assertEquals(language.getSupportedBlockTypes(), cloned.getSupportedBlockTypes()); assertEquals(language.getSupportedHeadingLevel(), cloned.getSupportedHeadingLevel()); assertEquals(language.getSupportedSpanTypes(), cloned.getSupportedSpanTypes()); assertEquals(language.getTagNameSubstitutions(), cloned.getTagNameSubstitutions()); }
Source:
public Producer createProducer() throws Exception { if (endpointType == EndpointType.dataset) { return new DataSetFlinkProducer(this); } else if (endpointType == EndpointType.datastream) { return new DataStreamFlinkProducer(this); } else return null; }

Target:
public Producer createProducer() throws Exception { if (endpointType == EndpointType.dataset) { return new DataSetFlinkProducer(this); } else if (endpointType == EndpointType.datastream) { return new DataStreamFlinkProducer(this); } else { return null; } }
Source:
protected N performAdd(N incoming) { ClusterPolicy entity = getClusterPolicy(); validateUpdate(incoming, map(entity)); performAction(VdcActionType.EditClusterPolicy, getParametersProvider().getParameters(incoming, entity)); entity = getClusterPolicy(); updateIncomingId(incoming); N model = map(entity, incoming); return addLinks(doPopulate(model, entity)); }

Target:
protected N performAdd(N incoming) { ClusterPolicy entity = getClusterPolicy(); performAction(VdcActionType.EditClusterPolicy, getAddParametersProvider().getParameters(incoming, entity)); entity = getClusterPolicy(); updateIncomingId(incoming); N model = map(entity, incoming); return addLinks(doPopulate(model, entity)); }
Source:
public void replaceExisting() throws Exception { client.apply(new AddSecretAuthentication.Builder(TEST_REALM_NAME) .password("secret") .build()); ops.exists(TEST_SECRET_IDENTITY_ADDRESS); client.apply(new AddSecretAuthentication.Builder(TEST_REALM_NAME) .password(PASSWORD) .replaceExisting() .build()); assertTrue("Server identity should be created", ops.exists(TEST_SECRET_IDENTITY_ADDRESS)); ModelNodeResult result = ops.readAttribute(TEST_SECRET_IDENTITY_ADDRESS, "value"); result.assertSuccess(); assertEquals("Password should be encoded properly.", PASSWORD, new String(BaseEncoding.base64().decode(result.stringValue()))); }

Target:
public void replaceExisting() throws Exception { client.apply(new AddSecretAuthentication.Builder(TEST_REALM_NAME) .password("secret") .build()); assertTrue("Server identyty should be created", ops.exists(TEST_SECRET_IDENTITY_ADDRESS)); client.apply(new AddSecretAuthentication.Builder(TEST_REALM_NAME) .password(PASSWORD) .replaceExisting() .build()); assertTrue("Server identity should be created", ops.exists(TEST_SECRET_IDENTITY_ADDRESS)); ModelNodeResult result = ops.readAttribute(TEST_SECRET_IDENTITY_ADDRESS, "value"); result.assertSuccess(); assertEquals("Password should be encoded properly.", PASSWORD, new String(BaseEncoding.base64().decode(result.stringValue()), "UTF-8")); }
Source:
public void process(Exchange exchange) throws Exception { final Message in = exchange.getIn(); Document body = (Document) in.getBody(); if (body == null) { log.warn("Event message contained no body"); return; } Element content = body.getRootElement().getChild("content", JDOMNamespaceUtil.ATOM_NS); Element contentBody = content.getChildren().get(0); if (contentBody == null || contentBody.getChildren().size() == 0) { log.warn("Event message contained no body content"); return; } String targetId = JMSMessageUtil.getPid(body); String solrActionType = (String) in.getHeader(CdrSolrUpdateAction); String userid = (String) in.getHeader("name"); if (solrActionType == null || solrActionType.equals("none")) { log.warn("No solr update action specified, ignoring event for object {}", targetId); return; } List<String> subjects = populateList("subjects", contentBody); if (MOVE.equals(solrActionType)) { messageSender.sendIndexingOperation(userid, Collections.singletonList(PIDs.get(targetId)), IndexingActionType.MOVE); } else if (ADD.equals(solrActionType)) { messageSender.sendIndexingOperation(userid, Collections.singletonList(PIDs.get(targetId)), IndexingActionType.ADD_SET_TO_PARENT); } else if (PUBLISH.equals(solrActionType)) { for (String pidString : subjects) { messageSender.sendIndexingOperation(userid, Collections.singletonList(PIDs.get(pidString)), IndexingActionType.UPDATE_STATUS); } } else { log.warn("Invalid solr update action {}, ignoring event for object {}", solrActionType, targetId); return; } }

Target:
public void process(Exchange exchange) throws Exception { final Message in = exchange.getIn(); Document body = (Document) in.getBody(); if (body == null) { log.warn("Event message contained no body"); return; } Element content = body.getRootElement().getChild("content", JDOMNamespaceUtil.ATOM_NS); Element contentBody = content.getChildren().get(0); if (contentBody == null || contentBody.getChildren().size() == 0) { log.warn("Event message contained no body content"); return; } String targetId = JMSMessageUtil.getPid(body); String solrActionType = (String) in.getHeader(CdrSolrUpdateAction); String userid = (String) in.getHeader("name"); if (solrActionType == null || solrActionType.equals("none")) { log.warn("No solr update action specified, ignoring event for object {}", targetId); return; } List<String> subjects = populateList("subjects", contentBody); List<PID> childPids = new ArrayList<>(); for (String subject : subjects) { childPids.add(PIDs.get(subject)); } if (MOVE.equals(solrActionType)) { messageSender.sendIndexingOperation(userid, PIDs.get(targetId), childPids, IndexingActionType.MOVE); } else if (ADD.equals(solrActionType)) { messageSender.sendIndexingOperation(userid, PIDs.get(targetId), childPids, IndexingActionType.ADD_SET_TO_PARENT); } else if (PUBLISH.equals(solrActionType)) { messageSender.sendIndexingOperation(userid, PIDs.get(targetId), childPids, IndexingActionType.UPDATE_STATUS); } else { log.warn("Invalid solr update action {}, ignoring event for object {}", solrActionType, targetId); return; } }
Source:
public void completeCheckout(Checkout checkout, final Callback<Payment> callback) { if (checkout == null) { throw new NullPointerException("checkout cannot be null"); } PaymentRequest paymentRequest = new PaymentRequest(); String paymentSessionId = checkout.getPaymentSessionId(); if (!TextUtils.isEmpty(paymentSessionId)) { paymentRequest.setPaymentSessionId(paymentSessionId); } PaymentRequestWrapper paymentRequestWrapper = new PaymentRequestWrapper(paymentRequest); retrofitService.completeCheckout(paymentRequestWrapper, checkout.getToken()).observeOn(getCallbackScheduler()).subscribe(new InternalCallback<PaymentWrapper>() { @Override public void success(PaymentWrapper paymentWrapper, Response response) { callback.success(paymentWrapper.getPayment(), response); } @Override public void failure(RetrofitError error) { callback.failure(error); } }); }

Target:
public void completeCheckout(Checkout checkout, final Callback<Payment> callback) { if (checkout == null) { throw new NullPointerException("checkout cannot be null"); } PaymentRequest paymentRequest = new PaymentRequest(checkout.getPaymentSessionId()); PaymentRequestWrapper paymentRequestWrapper = new PaymentRequestWrapper(paymentRequest); retrofitService.completeCheckout(paymentRequestWrapper, checkout.getToken()).observeOn(getCallbackScheduler()).subscribe(new InternalCallback<PaymentWrapper>() { @Override public void success(PaymentWrapper paymentWrapper, Response response) { callback.success(paymentWrapper.getPayment(), response); } @Override public void failure(RetrofitError error) { callback.failure(error); } }); }
Source:
public void setUp() { classInstance = new urn_perun_user_facility_attribute_def_virt_shell(); session = mock(PerunSessionImpl.class, RETURNS_DEEP_STUBS); preffered = new Attribute(); def_def_shell = new Attribute(); facilityShell = new Attribute(); resourceShell = new ArrayList(); listOfMntPts = new ArrayList<String>(); for(int i=0;i<5;i++) listOfMntPts.add("/mnt/bash" + i); preffered.setValue(new ArrayList(listOfMntPts)); listOfMntPts.clear(); listOfMntPts.add("/mnt/bash2"); facilityShell.setValue(listOfMntPts); resourceShell.addAll(listOfMntPts); user = new User(); facility = new Facility(); resource = new Resource(); resource.setName("myResource"); resource.setDescription("desc"); resource1 = new Resource(); resource1.setId(1); resource1.setName("myResource"); resource1.setDescription("desc"); resourceList = new ArrayList<Resource>(); resourceList.add(resource1); }

Target:
public void setUp() { classInstance = new urn_perun_user_facility_attribute_def_virt_shell(); session = mock(PerunSessionImpl.class, RETURNS_DEEP_STUBS); preffered = new Attribute(); defDefShell = new Attribute(); facilityShell = new Attribute(); resourceShell = new ArrayList(); listOfMntPts = new ArrayList<String>(); for(int i=0;i<5;i++) listOfMntPts.add("/mnt/bash" + i); preffered.setValue(new ArrayList(listOfMntPts)); listOfMntPts.clear(); listOfMntPts.add("/mnt/bash2"); facilityShell.setValue(listOfMntPts); resourceShell.addAll(listOfMntPts); user = new User(); facility = new Facility(); resource = new Resource(); resource.setName("myResource"); resource.setDescription("desc"); resource1 = new Resource(); resource1.setId(1); resource1.setName("myResource"); resource1.setDescription("desc"); resourceList = new ArrayList<Resource>(); resourceList.add(resource1); }
Source:
protected boolean isDataStall() { Boolean result = null; if (!mNetworkCapabilities.hasCapability(NET_CAPABILITY_NOT_METERED) && (SystemClock.elapsedRealtime() - getLastProbeTime() < mDataStallMinEvaluateTime)) { return false; } if (dataStallEvaluateTypeEnabled(DATA_STALL_EVALUATION_TYPE_TCP)) { if (getTcpSocketTracker().getSentSinceLastRecv() > 0) { result = false; } if ((result == null) && getTcpSocketTracker().isDataStallSuspected()) { result = true; } } if ((result == null) && dataStallEvaluateTypeEnabled(DATA_STALL_EVALUATION_TYPE_DNS)) { if (mDnsStallDetector.isDataStallSuspected(mConsecutiveDnsTimeoutThreshold, mDataStallValidDnsTimeThreshold)) { result = true; logNetworkEvent(NetworkEvent.NETWORK_CONSECUTIVE_DNS_TIMEOUT_FOUND); } } if (VDBG_STALL) { log("isDataStall: result=" + result + ", consecutive dns timeout count=" + mDnsStallDetector.getConsecutiveTimeoutCount() + ", tcp packets received=" + getTcpSocketTracker().getSentSinceLastRecv() + ", tcp fail rate=" + getTcpSocketTracker().getLatestPacketFailRate()); } return (result == null) ? false : result; }

Target:
protected boolean isDataStall() { Boolean result = null; if (!mNetworkCapabilities.hasCapability(NET_CAPABILITY_NOT_METERED) && (SystemClock.elapsedRealtime() - getLastProbeTime() < mDataStallMinEvaluateTime)) { return false; } if (dataStallEvaluateTypeEnabled(DATA_STALL_EVALUATION_TYPE_TCP)) { if (getTcpSocketTracker().getSentSinceLastRecv() > 0) { result = false; } else if (getTcpSocketTracker().isDataStallSuspected()) { result = true; } } if ((result == null) && dataStallEvaluateTypeEnabled(DATA_STALL_EVALUATION_TYPE_DNS)) { if (mDnsStallDetector.isDataStallSuspected(mConsecutiveDnsTimeoutThreshold, mDataStallValidDnsTimeThreshold)) { result = true; logNetworkEvent(NetworkEvent.NETWORK_CONSECUTIVE_DNS_TIMEOUT_FOUND); } } if (VDBG_STALL) { log("isDataStall: result=" + result + ", consecutive dns timeout count=" + mDnsStallDetector.getConsecutiveTimeoutCount() + ", tcp packets received=" + getTcpSocketTracker().getSentSinceLastRecv() + ", tcp fail rate=" + getTcpSocketTracker().getLatestPacketFailRate()); } return (result == null) ? false : result; }
Source:
private void writeGitPatchHeader(StringBuilder sb) { String template = headerFormat.getTemplate(); String[] segments = template.split("\\$\\{"); Stack<String> evaluated = new Stack<String>(); evaluated.add(segments[0]); for (int i = 1; i < segments.length; i++) { String segment = segments[i]; String value = null; int brace = segment.indexOf('}'); if (brace > 0) { String keyword = segment.substring(0, brace); keyword = keyword.toUpperCase().replaceAll(" ", "_"); value = processKeyword(commit, DiffHeaderKeyword.valueOf(keyword)); } String trailingCharacters = segment.substring(brace + 1); if (value != null) { evaluated.add(value); evaluated.add(trailingCharacters); } else if (!evaluated.isEmpty()) { evaluated.add(trailingCharacters); } } StringBuffer buffer = new StringBuffer(); for (String string : evaluated) { buffer.append(string); } sb.append(buffer); }

Target:
private void writeGitPatchHeader(StringBuilder sb) { String template = headerFormat.getTemplate(); String[] segments = template.split("\\$\\{"); Stack<String> evaluated = new Stack<String>(); evaluated.add(segments[0]); for (int i = 1; i < segments.length; i++) { String segment = segments[i]; String value = null; int brace = segment.indexOf('}'); if (brace > 0) { String keyword = segment.substring(0, brace); keyword = keyword.toUpperCase().replaceAll(" ", "_"); value = processKeyword(commit, DiffHeaderKeyword.valueOf(keyword)); } String trailingCharacters = segment.substring(brace + 1); if (value != null) { evaluated.add(value); evaluated.add(trailingCharacters); } else if (!evaluated.isEmpty()) evaluated.add(trailingCharacters); } StringBuffer buffer = new StringBuffer(); for (String string : evaluated) buffer.append(string); sb.append(buffer); }
Source:
findSourceFields(ImmutableList<FieldRef> references, FieldDescriptor enrichmentField) { int refCount = references.size(); checkArgument(refCount > 0, "References may not be empty"); Set<FieldDescriptor> result = new HashSet<>(refCount); FieldDescriptor.Type basicType = null; Descriptor messageType = null; for (FieldRef ref : references) { boolean strict = refCount == 1; FieldDescriptor field = findSourceField(ref, enrichmentField, strict); if (field == null) { continue; } if (basicType == null) { basicType = field.getType(); if (basicType == MESSAGE) { messageType = field.getMessageType(); } } else { checkState(basicType == field.getType(), differentTypesErrorMessage(enrichmentField)); if (basicType == MESSAGE) { checkState(messageType.equals(field.getMessageType()), differentTypesErrorMessage(enrichmentField)); } } boolean noDuplicateFiled = result.add(field); checkState( noDuplicateFiled, "Enrichment target field names may contain no duplicates. " + "Found duplicate field: %s", ref ); } return result; }

Target:
findSourceFields(ImmutableList<FieldRef> references, FieldDescriptor enrichmentField) { int refCount = references.size(); checkArgument(refCount > 0, "References may not be empty"); Set<FieldDescriptor> result = new HashSet<>(refCount); FieldDescriptor.Type basicType = null; Descriptor messageType = null; boolean strict = refCount == 1; for (FieldRef ref : references) { FieldDescriptor field = findSourceField(ref, enrichmentField, strict); if (field == null) { continue; } if (basicType == null) { basicType = field.getType(); if (basicType == MESSAGE) { messageType = field.getMessageType(); } } else { checkState(basicType == field.getType(), differentTypesErrorMessage(enrichmentField)); if (basicType == MESSAGE) { checkState(messageType.equals(field.getMessageType()), differentTypesErrorMessage(enrichmentField)); } } boolean noDuplicateFiled = result.add(field); checkState( noDuplicateFiled, "Enrichment target field names may contain no duplicates. " + "Found duplicate field: %s", ref ); } return result; }
Source:
public TaskResult runTask() { Config params = request.getConfig() .mergeDefault(request.getConfig().getNestedOrGetEmpty("sh")); String shell = params.get("shell", String.class, "/bin/sh -c"); String command = params.get("_command", String.class); List<String> cmdline = new ArrayList<String>(Arrays.asList(shell.split(" "))); cmdline = cmdline.stream().filter(cmd -> !cmd.isEmpty()).collect(Collectors.toList()); cmdline.add(command); ProcessBuilder pb = new ProcessBuilder(cmdline); final Map<String, String> env = pb.environment(); params.getKeys() .forEach(key -> { if (isValidEnvKey(key)) { JsonNode value = params.get(key, JsonNode.class); String string; if (value.isTextual()) { string = value.textValue(); } else { string = value.toString(); } env.put(key, string); } else { logger.trace("Ignoring invalid env var key: {}", key); } }); String pathEnv = System.getenv("PATH"); if (pathEnv == null) { pathEnv = workspacePath.toAbsolutePath().toString(); } else { pathEnv = pathEnv + File.pathSeparator + workspacePath.toAbsolutePath().toString(); } pb.redirectErrorStream(true); int ecode; try { Process p = exec.start(workspacePath, request, pb); p.getOutputStream().close(); clog.copyStdout(p, System.out); ecode = p.waitFor(); } catch (IOException | InterruptedException ex) { throw Throwables.propagate(ex); } if (ecode != 0) { throw new RuntimeException("Command failed with code " + ecode); } return TaskResult.empty(request); }

Target:
public TaskResult runTask() { Config params = request.getConfig() .mergeDefault(request.getConfig().getNestedOrGetEmpty("sh")); List<String> shell = params.getListOrEmpty("shell", String.class); String command = params.get("_command", String.class); ImmutableList.Builder<String> cmdline = ImmutableList.builder(); if (shell.isEmpty()) { cmdline.addAll(ImmutableList.of("/bin/sh", "-c")); } else { cmdline.addAll(shell); } cmdline.add(command); ProcessBuilder pb = new ProcessBuilder(cmdline.build()); final Map<String, String> env = pb.environment(); params.getKeys() .forEach(key -> { if (isValidEnvKey(key)) { JsonNode value = params.get(key, JsonNode.class); String string; if (value.isTextual()) { string = value.textValue(); } else { string = value.toString(); } env.put(key, string); } else { logger.trace("Ignoring invalid env var key: {}", key); } }); String pathEnv = System.getenv("PATH"); if (pathEnv == null) { pathEnv = workspacePath.toAbsolutePath().toString(); } else { pathEnv = pathEnv + File.pathSeparator + workspacePath.toAbsolutePath().toString(); } pb.redirectErrorStream(true); int ecode; try { Process p = exec.start(workspacePath, request, pb); p.getOutputStream().close(); clog.copyStdout(p, System.out); ecode = p.waitFor(); } catch (IOException | InterruptedException ex) { throw Throwables.propagate(ex); } if (ecode != 0) { throw new RuntimeException("Command failed with code " + ecode); } return TaskResult.empty(request); }
Source:
private boolean operandsAreOnSameLine(BinaryExpressionTree formatStringTree) { return FirstSyntaxTokenFinder.firstSyntaxToken(formatStringTree.leftOperand()).line() == FirstSyntaxTokenFinder.firstSyntaxToken(formatStringTree.rightOperand()).line(); }

Target:
private static boolean operandsAreOnSameLine(BinaryExpressionTree formatStringTree) { return FirstSyntaxTokenFinder.firstSyntaxToken(formatStringTree.leftOperand()).line() == FirstSyntaxTokenFinder.firstSyntaxToken(formatStringTree.rightOperand()).line(); }
Source:
public TarArchiveEntry(final Path file) { this(file, file.toString()); }

Target:
public TarArchiveEntry(final Path file) throws IOException { this(file, file.toString()); }
Source:
public void destroyBlockingChannel(BlockingChannel blockingChannel) { rwlock.readLock().lock(); try { boolean changed = blockingChannelActiveConnections.remove(blockingChannel); if (!changed) { logger.error("Invalid connection being destroyed. " + "Channel does not belong to this queue. queue host port channel host port {}", host, port.getPort(), blockingChannel.getRemoteHost(), blockingChannel.getRemotePort()); throw new IllegalArgumentException("Invalid connection. Channel does not belong to this queue"); } blockingChannel.disconnect(); BlockingChannel channel = getBlockingChannelBasedOnPortType(blockingChannel.getRemoteHost(), blockingChannel.getRemotePort()); channel.connect(); logger.trace("Destroying connection and adding new connection for host port {}", host, port.getPort()); blockingChannelAvailableConnections.add(channel); currentConnectFailuresToCleanUp.set(0); } catch (Exception e) { logger .error("Connection failure to remote host and port when destroying and recreating the connection", host, port.getPort()); synchronized (lock) { numberOfConnections.decrementAndGet(); currentConnectFailuresToCleanUp.incrementAndGet(); if(currentConnectFailuresToCleanUp.get() >= maxConnectFailuresToCleanUp) { while(!blockingChannelAvailableConnections.isEmpty()){ blockingChannelAvailableConnections.poll().disconnect(); } currentConnectFailuresToCleanUp.set(0); } } } finally { rwlock.readLock().unlock(); } }

Target:
public void destroyBlockingChannel(BlockingChannel blockingChannel) { rwlock.readLock().lock(); try { boolean changed = blockingChannelActiveConnections.remove(blockingChannel); if (!changed) { logger.error("Invalid connection being destroyed. " + "Channel does not belong to this queue. queue host port channel host port {}", host, port.getPort(), blockingChannel.getRemoteHost(), blockingChannel.getRemotePort()); throw new IllegalArgumentException("Invalid connection. Channel does not belong to this queue"); } blockingChannel.disconnect(); BlockingChannel channel = getBlockingChannelBasedOnPortType(blockingChannel.getRemoteHost(), blockingChannel.getRemotePort()); channel.connect(); logger.trace("Destroying connection and adding new connection for host port {}", host, port.getPort()); blockingChannelAvailableConnections.add(channel); } catch (Exception e) { logger.error("Connection failure to remote host and port when destroying and recreating the connection", host, port.getPort()); synchronized (lock) { numberOfConnections.decrementAndGet(); do { BlockingChannel channel = blockingChannelAvailableConnections.poll(); if (channel == null) { break; } channel.disconnect(); numberOfConnections.decrementAndGet(); } while (true); } } finally { rwlock.readLock().unlock(); } }
Source:
public int hashCode() { return Objects.hash(this.getKey()); }

Target:
public int hashCode() { return Objects.hashCode(this.getKey()); }
Source:
public Iterable<Range> listHistoryVerticesTableSplits() { try { return splitsIterableToRangeIterable(getConnector().tableOperations().listSplits(getHistoryVerticesTableName())); } catch (Exception ex) { throw new VertexiumException("Could not get splits for: " + getHistoryVerticesTableName(), ex); } }

Target:
public Iterable<Range> listHistoryVerticesTableSplits() { return listTableSplits(getHistoryVerticesTableName()); }
Source:
public void updateStats(final boolean isGlobal, final long start, final long end) { Thread statsThread = new Thread("Statistics update") { @Override public void run() { long total; Map<String, Long> map; waitUntilBuilt(); total = getEventsInRange(start, end); map = getEventTypesInRange(start, end); TmfSignal sig = new TmfStatsUpdatedSignal(this, trace, isGlobal, total, map); TmfSignalManager.dispatchSignal(sig); } }; statsThread.start(); return; }

Target:
public void updateStats(final boolean isGlobal, final long start, final long end) { Thread statsThread = new Thread("Statistics update") { @Override public void run() { if (!waitUntilBuilt()) { return; } long total = getEventsInRange(start, end); Map<String, Long> map = getEventTypesInRange(start, end); TmfSignal sig = new TmfStatsUpdatedSignal(this, trace, isGlobal, total, map); TmfSignalManager.dispatchSignal(sig); } }; statsThread.start(); return; }
Source:
ComponentType(String service, String distributionParameter, String distributionRepositoryValueParameter, String versionParameter, String versionRepositoryValueParameter, List<String> componentLists) { this.mService = service; this.mDistributionParameter = distributionParameter; this.mVersionParameter = versionParameter; this.mDistributionRepositoryValueParameter = distributionRepositoryValueParameter; this.mVersionRepositoryValueParameter = versionRepositoryValueParameter; this.mComponentList = componentLists; }

Target:
ComponentType(String service, String distributionParameter, String distributionRepositoryValueParameter, String versionParameter, String versionRepositoryValueParameter, List<String> componentLists) { this.mService = service; this.mDistributionParameter = distributionParameter; this.mVersionParameter = versionParameter; this.mDistributionRepositoryValueParameter = distributionRepositoryValueParameter; this.mVersionRepositoryValueParameter = versionRepositoryValueParameter; this.mComponentList = new ArrayList<String>( componentLists ); }
Source:
public void setSeparator(String separator) { if (separator.contains("\\n")) { this.separator = "\n"; } else { this.separator = separator; } }

Target:
public void setSeparator(String separator) { if (separator.equals("\\n")) { this.separator = "\n"; } else { this.separator = separator; } }