id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
1,801 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) != null) {
| partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
1,802 | fileEntry, serviceContext.getCommunityPermissions(),
serviceContext.getGuestPermissions());
}
addFileVersion(
user, fileEntry, serviceContext.getModifiedDate(now),
<BUG>fileEntry.getVersion(), null, serviceContext.getStatus());
if (folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {</BUG>
DLFolder folder = dlFolderPersistence.findByPrimaryKey(folderId);
folder.setLastPostDate(fileEntry.getModifiedDate());
dlFolderPersistence.update(folder, false);
| DLFileEntryConstants.DEFAULT_VERSION, null,
if (folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
|
1,803 | fileEntry = newFileEntry;
}
updateAsset(
userId, fileEntry, serviceContext.getAssetCategoryIds(),
serviceContext.getAssetTagNames());
<BUG>String version = getNextVersion(fileEntry, majorVersion);
if (is == null) {</BUG>
fileEntry.setVersion(version);
dlFileEntryPersistence.update(fileEntry, false);
int fetchFailures = 0;
| String version = getNextVersion(
fileEntry, majorVersion, serviceContext.getStatus());
if (is == null) {
|
1,804 | myUseCygwinLaunch = useCygwinLaunch;
}
public void setConsoleMode(boolean consoleMode) {
myConsoleMode = consoleMode;
}
<BUG>private static File getPtyLogFile() {
return new File(PathManager.getLogPath(), "pty.log");
</BUG>
}
@NotNull
| Application app = ApplicationManager.getApplication();
return app != null && app.isEAP() ? new File(PathManager.getLogPath(), "pty.log") : null;
|
1,805 | public Process startProcessWithPty(@NotNull List<String> commands, boolean console) throws IOException {
Map<String, String> env = new HashMap<String, String>();
setupEnvironment(env);
if (isRedirectErrorStream()) {
LOG.error("Launching process with PTY and redirected error stream is unsupported yet");
<BUG>}
File workDirectory = getWorkDirectory();
boolean cygwin = myUseCygwinLaunch && SystemInfo.isWindows;
return PtyProcess.exec(ArrayUtil.toStringArray(commands), env, workDirectory != null ? workDirectory.getPath() : null, console, cygwin,
ApplicationManager.getApplication().isEAP() ? getPtyLogFile() : null);</BUG>
}
| [DELETED] |
1,806 | public void passingArgumentsToJavaAppThroughCmdScriptAndWinShell() throws Exception {
assumeTrue(SystemInfo.isWindows);
Pair<GeneralCommandLine, File> command = makeHelperCommand(null, CommandTestHelper.ARG);
File script = ExecUtil.createTempExecutableScript("my script ", ".cmd", "@" + command.first.getCommandLineString() + " %*");
try {
<BUG>GeneralCommandLine commandLine = new GeneralCommandLine(ExecUtil.getWindowsShellName(), "/D", "/C", "call", script.getAbsolutePath());
</BUG>
commandLine.addParameters(ARGUMENTS);
String output = execHelper(pair(commandLine, command.second));
checkParamPassing(output, ARGUMENTS);
| GeneralCommandLine commandLine = createCommandLine(ExecUtil.getWindowsShellName(), "/D", "/C", "call", script.getAbsolutePath());
|
1,807 | String... args) throws IOException, URISyntaxException {
String className = CommandTestHelper.class.getName();
URL url = GeneralCommandLine.class.getClassLoader().getResource(className.replace(".", "/") + ".class");
assertNotNull(url);
<BUG>GeneralCommandLine commandLine = new GeneralCommandLine();
</BUG>
commandLine.setExePath(System.getProperty("java.home") + (SystemInfo.isWindows ? "\\bin\\java.exe" : "/bin/java"));
String encoding = System.getProperty("file.encoding");
if (encoding != null) {
commandLine.addParameter("-D" + "file.encoding=" + encoding);
| GeneralCommandLine commandLine = createCommandLine();
|
1,808 | package org.elasticsearch.search.rescore;
import org.apache.lucene.util.English;
<BUG>import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.search.SearchResponse;</BUG>
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.common.lucene.search.function.CombineFunction;
import org.elasticsearch.common.settings.ImmutableSettings;
| import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
|
1,809 | import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.ImmutableSettings.Builder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.MatchQueryBuilder;
<BUG>import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;</BUG>
import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.rescore.RescoreBuilder.QueryRescorer;
import org.elasticsearch.test.ElasticsearchIntegrationTest;
| import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders;
import org.elasticsearch.search.SearchHit;
|
1,810 | String[] intToEnglish = new String[] { English.intToEnglish(i), English.intToEnglish(i + 1), English.intToEnglish(i + 2), English.intToEnglish(i + 3) };
QueryRescorer rescoreQuery = RescoreBuilder
.queryRescorer(
QueryBuilders.boolQuery()
.disableCoord(true)
<BUG>.should(QueryBuilders.customScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[0])).script("5.0f"))
.should(QueryBuilders.customScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[1])).script("7.0f"))
.should(QueryBuilders.customScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[3])).script("0.0f")))
.setQueryWeight(primaryWeight)</BUG>
.setRescoreQueryWeight(secondaryWeight);
| .should(QueryBuilders.functionScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[0])).boostMode(CombineFunction.REPLACE).add(ScoreFunctionBuilders.scriptFunction("5.0f")))
.should(QueryBuilders.functionScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[1])).boostMode(CombineFunction.REPLACE).add(ScoreFunctionBuilders.scriptFunction("7.0f")))
.should(QueryBuilders.functionScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[3])).boostMode(CombineFunction.REPLACE).add(ScoreFunctionBuilders.scriptFunction("0.0f"))))
.setQueryWeight(primaryWeight)
|
1,811 | SearchResponse rescored = client()
.prepareSearch()
.setPreference("test") // ensure we hit the same shards for tie-breaking
.setQuery(QueryBuilders.boolQuery()
.disableCoord(true)
<BUG>.should(QueryBuilders.customScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[0])).script("2.0f"))
.should(QueryBuilders.customScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[1])).script("3.0f"))
.should(QueryBuilders.customScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[2])).script("5.0f"))
.should(QueryBuilders.customScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[3])).script("0.2f")))
.setFrom(0)</BUG>
.setSize(10)
| .should(QueryBuilders.functionScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[0])).boostMode(CombineFunction.REPLACE).add(ScoreFunctionBuilders.scriptFunction("2.0f")))
.should(QueryBuilders.functionScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[1])).boostMode(CombineFunction.REPLACE).add(ScoreFunctionBuilders.scriptFunction("3.0f")))
.should(QueryBuilders.functionScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[2])).boostMode(CombineFunction.REPLACE).add(ScoreFunctionBuilders.scriptFunction("5.0f")))
.should(QueryBuilders.functionScoreQuery(QueryBuilders.termQuery("field1", intToEnglish[3])).boostMode(CombineFunction.REPLACE).add(ScoreFunctionBuilders.scriptFunction("0.2f"))))
.setFrom(0)
|
1,812 | import com.fincatto.nfe310.FabricaDeObjetosFake;
import org.junit.Assert;
import org.junit.Test;
import java.math.BigDecimal;
import java.util.ArrayList;
<BUG>import java.util.Arrays;
import java.util.List;</BUG>
public class NFEnviaEventoCancelamentoTest {
@Test
public void deveObterEventosComoFoiSetado() {
| import java.util.Collections;
import java.util.List;
|
1,813 | import com.fincatto.nfe310.FabricaDeObjetosFake;
import com.fincatto.nfe310.classes.nota.NFNota;
import org.junit.Assert;
import org.junit.Test;
import java.util.ArrayList;
<BUG>import java.util.Arrays;
import java.util.List;</BUG>
public class NFLoteEnvioTest {
@Test
public void devePermitirNotasComTamanho50() {
| import java.util.Collections;
import java.util.List;
|
1,814 | public void deveGerarXMLDeAcordoComOPadraoEstabelecido() {
final NFLoteEnvio loteEnvio = new NFLoteEnvio();
loteEnvio.setIdLote("333972757970401");
loteEnvio.setVersao("3.10");
loteEnvio.setIndicadorProcessamento(NFLoteIndicadorProcessamento.PROCESSAMENTO_ASSINCRONO);
<BUG>loteEnvio.setNotas(Arrays.asList(FabricaDeObjetosFake.getNFNota()));
</BUG>
final String xmlEsperado = "<enviNFe versao=\"3.10\" xmlns=\"http://www.portalfiscal.inf.br/nfe\"><idLote>333972757970401</idLote><indSinc>0</indSinc><NFe><infNFe Id=\"NFe89172658591754401086218048846976493475937081\" versao=\"3.10\"><ide><cUF>43</cUF><cNF>99999999</cNF><natOp>qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ</natOp><indPag>1</indPag><mod>55</mod><serie>999</serie><nNF>999999999</nNF><dhEmi>2010-10-27T10:10:10-02:00</dhEmi><dhSaiEnt>2013-09-24T10:10:10-03:00</dhSaiEnt><tpNF>0</tpNF><idDest>1</idDest><cMunFG>1612675</cMunFG><tpImp>2</tpImp><tpEmis>1</tpEmis><cDV>8</cDV><tpAmb>1</tpAmb><finNFe>1</finNFe><indFinal>1</indFinal><indPres>0</indPres><procEmi>0</procEmi><verProc>532ng7VURPgovC5BYaZy</verProc><dhCont>2014-10-10T10:10:10-03:00</dhCont><xJust>b1Aj7VBU5I0LDthlrWTk73otsFXSVbiNYyAgGZjLYT0pftpjhGzQEAtnolQoAEB3omnxNq8am4iMqwwviuaXRHjiYWY7YaPITlDN7cDN9obnhEqhDhkgKphRBY5frTfD6unwTB4w7j6hpY2zNNzWwbNJzPGgDmQ8WhBDnpq1fQOilrcDspY7SGkNDfjxpGTQyNSNsmF4B2uHHLhGhhxG2qVq2bFUvHFqSL8atQAuYpyn3wplW21v88N96PnF0MEV</xJust><NFref><refCTe>19506188293993666630760813709064781438945816</refCTe></NFref></ide><emit><CPF>12345678901</CPF><xNome>Rhass3yMarv7W26gljGNMGXXyPZfSFDEiN472mTU7UWxokviyHMfeD7vCVg3</xNome><xFant>TKuTABBqcwEOeMwQepTIAvhOPx8qDf8Q5C8fbGgjonxl1ML9NErg9yVk2bGn</xFant><enderEmit><xLgr>NKwaAJ5ZJ49aQYmqBvxMhBzkGUqvtXnqusGEtjDzKCXPGwrEZCS8LGKHyBbV</xLgr><nro>11mzXHR8rZTgfE35EqfGhiShiIwQfLCAziFDXVgs3EjLSPkZkCvfGNLMEf5y</nro><xCpl>Fr3gSvoAeKbGpQD3r98KFeB50P3Gq14XBVsv5fpiaBvJ3HTOpREiwYGs20Xw</xCpl><xBairro>67LQFlXOBK0JqAE1rFi2CEyUGW5Z8QmmHhzmZ9GABVLKa9AbV0uFR0onl7nU</xBairro><cMun>9999999</cMun><xMun>s1Cr2hWP6bptQ80A9vWBuTaODR1U82LtKQi1DEm3LsAXu9AbkSeCtfXJVTKG</xMun><UF>RS</UF><CEP>88095550</CEP><cPais>1058</cPais><fone>12345678901324</fone></enderEmit><IE>12345678901234</IE><IEST>84371964648860</IEST><IM>zjfBnFVG8TBq8iW</IM><CNAE>0111111</CNAE><CRT>3</CRT></emit><avulsa><CNPJ>12345678901234</CNPJ><xOrgao>qNre0x2eJthUYIoKBuBbbGSeA4R2wrDLxNwCuDFkYD54flBLbBBMakGDgQUV</xOrgao><matr>Nn5PPREBbkfmmk4lBFwgvkuKg8prnY5CPqHIzqGiD1lTnZJ37nAZ4NBc8XwM</matr><xAgente>lkLip3hIYSAIzH3Tf1LWQsaybqB76V66lMgWBcHVwcOKInuJ8mGUyY8DT4NL</xAgente><fone>81579357</fone><UF>RS</UF><nDAR>qqDt1f1ulcahrBnUH0otPFkjYqD2tH4ktYsR71WSYZLFW1zZObAqajHHkyxi</nDAR><dEmi>2014-01-13</dEmi><vDAR>999999999999.99</vDAR><repEmi>YQFmDI2HBjjfZpRjR2ghwmSo1oWk5QgUEYf2oG46uEHwY4zsXyH1ORSr8oq3</repEmi><dPag>2014-03-21</dPag></avulsa><dest><CNPJ>12345678901234</CNPJ><xNome>F7HL85M9v7jW5lX4Z9V7sF3kshuj967gj4uACEmpmVQgM9yYeQAgaY5EcSfR</xNome><enderDest><xLgr>NKwaAJ5ZJ49aQYmqBvxMhBzkGUqvtXnqusGEtjDzKCXPGwrEZCS8LGKHyBbV</xLgr><nro>11mzXHR8rZTgfE35EqfGhiShiIwQfLCAziFDXVgs3EjLSPkZkCvfGNLMEf5y</nro><xCpl>Fr3gSvoAeKbGpQD3r98KFeB50P3Gq14XBVsv5fpiaBvJ3HTOpREiwYGs20Xw</xCpl><xBairro>67LQFlXOBK0JqAE1rFi2CEyUGW5Z8QmmHhzmZ9GABVLKa9AbV0uFR0onl7nU</xBairro><cMun>9999999</cMun><xMun>s1Cr2hWP6bptQ80A9vWBuTaODR1U82LtKQi1DEm3LsAXu9AbkSeCtfXJVTKG</xMun><UF>RS</UF><CEP>88095550</CEP><cPais>1058</cPais><fone>12345678901324</fone></enderDest><indIEDest>9</indIEDest><IE>13245678901234</IE><ISUF>999999999</ISUF><IM>5ow5E1mZQPe1VUR</IM><email>ivU3ctXKzImStrYzRpDTXRyCfSzxlEe5GTbeyVZ1OlIvgKGLJJMJlaKtYj8K</email></dest><retirada><CNPJ>12345678901234</CNPJ><xLgr>t59le7pl2eVn390y026Ebgh3HXtvEBzsMp4BzZJEwIazezToxeeKJCvm1GoG</xLgr><nro>YHTewrLNvzYaBmSbwxkDYcEZTCMORFVPAc6t6C5p0Bfu1globey70KWnaHHa</nro><xCpl>ifyKIg3j3eZtlNVAj3XJYZiJCrul6VLL85E7x6Kx6DVeChwlRLEkCQn7k5pe</xCpl><xBairro>JE17uXBNBnYTSTSQgqXcGLOR6f22SnahtFHr5MoHQZtZhTowVe3SVwl57kil</xBairro><cMun>9999999</cMun><xMun>OpXKhaHINo7OwLkVGvRq43HNwyBAgXTKcarl6Jsq8NzOBs70eZM4zL6fELOI</xMun><UF>RS</UF></retirada><entrega><CNPJ>12345678901234</CNPJ><xLgr>t59le7pl2eVn390y026Ebgh3HXtvEBzsMp4BzZJEwIazezToxeeKJCvm1GoG</xLgr><nro>YHTewrLNvzYaBmSbwxkDYcEZTCMORFVPAc6t6C5p0Bfu1globey70KWnaHHa</nro><xCpl>ifyKIg3j3eZtlNVAj3XJYZiJCrul6VLL85E7x6Kx6DVeChwlRLEkCQn7k5pe</xCpl><xBairro>JE17uXBNBnYTSTSQgqXcGLOR6f22SnahtFHr5MoHQZtZhTowVe3SVwl57kil</xBairro><cMun>9999999</cMun><xMun>OpXKhaHINo7OwLkVGvRq43HNwyBAgXTKcarl6Jsq8NzOBs70eZM4zL6fELOI</xMun><UF>RS</UF></entrega><autXML><CNPJ>12345678901234</CNPJ></autXML><det nItem=\"990\"><prod><cProd>ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq</cProd><cEAN>36811963532505</cEAN><xProd>OBS0ztekCoG0DSSVcQwPKRV2fV842Pye7mED13P4zoDczcXi4AMNvQ7BKBLnHtLc2Z9fuIY1pcKmXSK1IJQSLEs5QWvVGyC74DyJuIM0X7L0cqWPZQii5JtP</xProd><NCM>99999999</NCM><NVE>AZ0123</NVE><CEST>9999999</CEST><EXTIPI>999</EXTIPI><CFOP>1302</CFOP><uCom>Bta64y</uCom><qCom>9999999999.9999</qCom><vUnCom>9999999999.9999999999</vUnCom><vProd>999999999999.99</vProd><cEANTrib>36811963532505</cEANTrib><uTrib>7wqG4h</uTrib><qTrib>9999999999.9999</qTrib><vUnTrib>9999999999.9999999999</vUnTrib><vFrete>999999999999.99</vFrete><vSeg>999999999999.99</vSeg><vDesc>999999999999.99</vDesc><vOutro>999999999999.99</vOutro><indTot>1</indTot><DI><nDI>ZRJihqWLyHnb</nDI><dDI>2014-02-02</dDI><xLocDesemb>kiVfWKB94ggsrWND0XBXwEjJkoiTXhkmX9qKGKzjpnEHHp852bDkYeEUkzpU</xLocDesemb><UFDesemb>RS</UFDesemb><dDesemb>2014-01-01</dDesemb><tpViaTransp>4</tpViaTransp><vAFRMM>999999999999.99</vAFRMM><tpIntermedio>3</tpIntermedio><CNPJ>12345678901234</CNPJ><UFTerceiro>RS</UFTerceiro><cExportador>E9jBqM65b0MiCiRnYil203iNGJOSZs8iU1KGmQsj2N0kw6QMuvhbsQosFGcU</cExportador><adi><nAdicao>999</nAdicao><nSeqAdic>999</nSeqAdic><cFabricante>sA2FBRFMMNgF1AKRDDXYOlc3zGvzEc69l6zQ5O5uAUe82XZ3szQfw01DW0Ki</cFabricante><vDescDI>999999999999.99</vDescDI><nDraw>99999999999</nDraw></adi></DI><xPed>NNxQ9nrQ3HCe5Mc</xPed><nItemPed>999999</nItemPed><med><nLote>yq50jVDZsvQVNuWoS45U</nLote><qLote>9999999.999</qLote><dFab>2014-01-01</dFab><dVal>2015-01-01</dVal><vPMC>999999999999.99</vPMC></med></prod><imposto><vTotTrib>999999999999.99</vTotTrib><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>1</modBC><vBC>999999999999.99</vBC><pICMS>99.99</pICMS><vICMS>999999999999.99</vICMS></ICMS00></ICMS><IPI><clEnq>157br</clEnq><CNPJProd>12345678901234</CNPJProd><cSelo>iNEFifS1jexTxcCvgjlQ186nR6JAwM2koyjbWKA1DJSLmZy432GoSwoygXc5</cSelo><qSelo>999999999999</qSelo><cEnq>aT2</cEnq><IPITrib><CST>49</CST><vBC>999999999999.99</vBC><pIPI>99.99</pIPI><vIPI>999999999999.99</vIPI></IPITrib></IPI><II><vBC>999999999999.99</vBC><vDespAdu>999999999999.99</vDespAdu><vII>999999999999.99</vII><vIOF>999999999999.99</vIOF></II><PIS><PISAliq><CST>01</CST><vBC>999999999999.99</vBC><pPIS>99.99</pPIS><vPIS>999999999999.99</vPIS></PISAliq></PIS><PISST><qBCProd>99999999999.9999</qBCProd><vAliqProd>9999999999.9999</vAliqProd><vPIS>999999999999.99</vPIS></PISST><COFINS><COFINSAliq><CST>01</CST><vBC>999999999999.99</vBC><pCOFINS>99.99</pCOFINS><vCOFINS>999999999999.99</vCOFINS></COFINSAliq></COFINS><COFINSST><vBC>999999999999.99</vBC><pCOFINS>99.99</pCOFINS><vCOFINS>999999999999.00</vCOFINS></COFINSST><ICMSUFDest><vBCUFDest>9999999999999.99</vBCUFDest><pFCPUFDest>999.9999</pFCPUFDest><pICMSUFDest>999.9999</pICMSUFDest><pICMSInter>7.00</pICMSInter><pICMSInterPart>999.9999</pICMSInterPart><vFCPUFDest>9999999999999.99</vFCPUFDest><vICMSUFDest>9999999999999.99</vICMSUFDest><vICMSUFRemet>9999999999999.99</vICMSUFRemet></ICMSUFDest></imposto><impostoDevol><pDevol>100.00</pDevol><IPI><vIPIDevol>9999999999999.99</vIPIDevol></IPI></impostoDevol><infAdProd>R3s36BVI9k15xOe3hnlEpZRpPHEom9inv4hE1oo8hzHYG8X6D9sQjt6oLYiH6yToSFM95zueMhE4s270GB7iLUKcQTRHWLcHb1TU2fSYx2NAz5ZflI3hoTnN8zmqJtGzneaNpDRA5gJW7wxMg9IXIuUCxg25MlIQ46AbDQNc3HLl82g3awWKigBMli0bUEWIMf8C2GG2sB2Y9w1GnsfiDvw7RUuU5vATfWWvYFRCehm2UpDhBlrBjjXcWKYzXsT3x2PNtCC82JqY1nkKrgt2AHCPUjM0tCQk5EHFcssb8I0Rkc4s8aNcARXtFrBzmWqXDQPmCpLIGaAo7LlypOKKaqUNqkRkf8c930p8HaRDvQJealZsVnpwJn3Ev7yEaBZ9INe5PXFwkTQEfpNE3B8IokFMh0aUbu8mfzjKLBazSKW2qA4faIo2Wp5FmOmTzCMiPqznOq3Bl0zM4wmuo0rOXbswjaCUzPB0KpM8Yaze9TArOEDrV6Li</infAdProd></det><total><ICMSTot><vBC>999999999999.99</vBC><vICMS>999999999999.99</vICMS><vICMSDeson>999999999999.99</vICMSDeson><vFCPUFDest>999999999999.99</vFCPUFDest><vICMSUFDest>999999999999.99</vICMSUFDest><vICMSUFRemet>999999999999.99</vICMSUFRemet><vBCST>999999999999.99</vBCST><vST>999999999999.99</vST><vProd>999999999999.99</vProd><vFrete>999999999999.99</vFrete><vSeg>999999999999.99</vSeg><vDesc>999999999999.99</vDesc><vII>999999999999.99</vII><vIPI>999999999999.99</vIPI><vPIS>999999999999.99</vPIS><vCOFINS>999999999999.99</vCOFINS><vOutro>999999999999.99</vOutro><vNF>999999999999.99</vNF></ICMSTot><ISSQNtot><vServ>999999999999.99</vServ><vBC>999999999999.99</vBC><vISS>999999999999.99</vISS><vPIS>999999999999.99</vPIS><vCOFINS>999999999999.99</vCOFINS><dCompet>2014-01-01</dCompet><vDeducao>999999999999.99</vDeducao><vOutro>999999999999.99</vOutro><vDescIncond>999999999999.99</vDescIncond><vDescCond>999999999999.99</vDescCond><vISSRet>999999999999.99</vISSRet><cRegTrib>3</cRegTrib></ISSQNtot><retTrib><vRetPIS>999999999999.99</vRetPIS><vRetCOFINS>999999999999.99</vRetCOFINS><vRetCSLL>999999999999.99</vRetCSLL><vBCIRRF>999999999999.99</vBCIRRF><vIRRF>999999999999.99</vIRRF><vBCRetPrev>999999999999.99</vBCRetPrev><vRetPrev>999999999999.99</vRetPrev></retTrib></total><transp><modFrete>9</modFrete><transporta><CNPJ>34843274000164</CNPJ><xNome>4lb4Qv5yi9oYq7s8fF98a0EEv98oAxl0CIs5gzyKNVp1skE3IHD9Z7JbjHCn</xNome><IE>ISENTO</IE><xEnder>D8nOWsHxI5K4RgYTUGwWgIKajhiUf4Q7aOOmaTV2wnYV0kQ5MezOjqfoPcNY</xEnder><xMun>4lb4Qv5yi9oYq7s8fF98a0EEv98oAxl0CIs5gzyKNVp1skE3IHD9Z7JbjHCn</xMun><UF>SP</UF></transporta><retTransp><vServ>999999999999.99</vServ><vBCRet>999999999999.99</vBCRet><pICMSRet>99.99</pICMSRet><vICMSRet>999999999999.99</vICMSRet><CFOP>5351</CFOP><cMunFG>9999999</cMunFG></retTransp><reboque><placa>MKZ4891</placa><UF>SC</UF></reboque><vol><qVol>99999999999</qVol><esp>3Qf46HFs7FcWlhuQqLJ96vsrgJHu6B5ZXmmwMZ1RtvQVOV4Yp6M9VNqn5Ecb</esp><marca>lc0w13Xw2PxsSD4u4q3N6Qix9ZuCFm0HXo6BxBmKnjVbh9Xwy3k9UwBNfuYo</marca><nVol>mcBUtZwnI5DKj2YZNAcLP7W9h6j1xKmF5SX1BTKmsvyg0H5xSrfVw8HGn8eb</nVol><pesoL>1.000</pesoL><pesoB>1.358</pesoB><lacres><nLacre>gvmjb9BB2cmwsLbzeR3Bsk8QbA7b1XEgXUhKeS9QZGiwhFnqDtEzS3377MP2</nLacre></lacres></vol></transp><cobr><fat><nFat>KDVAp0aewPjmHaTsjbDX1O6NOR9tc7TxGflFLXsMZt2hEKar3oqzZ11uzEQF</nFat><vOrig>3001.15</vOrig><vDesc>0.15</vDesc><vLiq>3000.00</vLiq></fat><dup><nDup>TQ49cyOL5KtBAUTF0LShhThpUbtCK1fQH1PH4AMcKzMNLxyDbV957IRhWK8Z</nDup><dVenc>2014-07-10</dVenc><vDup>999999.99</vDup></dup></cobr><pag><tPag>03</tPag><vPag>999999999999.99</vPag><card><tpIntegra>1</tpIntegra><CNPJ>12345678901234</CNPJ><tBand>02</tBand><cAut>9ItpS1hBk3TyhjUB3I90</cAut></card></pag><infAdic><infAdFisco>qe7Qi21GMSBan0iZLatpXAQAEhXEWZAO0HhHlQLlX18rryo9e1IX5Prav6fvNgZwfppMXa2RzJ7wyDH4gK3VEjeTARJ2iOLtZFDWrEaNMcGnKiusILw5bnRqBLxQfrtkTwcikLpsoI3ULurBUMMbSh1nJboZzwHUhWfArMie6CK1qBWeqgDUqMLXvkyZN66tOcBU4gv6oPZLaIJkblNYTZTEe4L1B5fx2TWec7P5Fi6HTWZiupnonWvZ51tPotK8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7wPA35xapjuLyPgt7ucGiSPrMn7acIzKWUhFjKMUrhgih2AHkm5RVoEDaaKhXFpKZS0g9yBTeRq3S6ik4QVQz755g54IwJQsS99E82wsx4uiBFCVHa6BxEKIeMchPZ1fzx9oYP1wmk6wejvraBAAK9c2TYSGaW5ENqB1TvlDMstwGpU9XncE9mogXzpoylr4vXj0GoDB27AIxyzlZBM4wSeo96mDgyNwUGnIZeJl9YLk6Y33V7eBVpumQK3j7fzq8sQ6xn7RIYze4F4GlnzUnXG4uTM5WfDH</infCpl><obsCont xCampo=\"kRkrK4FGWOn27RSjYjMB\"><xTexto>ML73tIXUvsLEMijwgwjHVRfpP6upxiuipvEcQcSp8fpV402GXe3nXEHXJKJo</xTexto></obsCont><obsFisco xCampo=\"kRkrK4FGWOn27RSjYjMB\"><xTexto>ML73tIXUvsLEMijwgwjHVRfpP6upxiuipvEcQcSp8fpV402GXe3nXEHXJKJo</xTexto></obsFisco><procRef><nProc>SziSRSIRZvYWlxcbmmJfRZsLgVHaHTurUL9ea1kwFe7fssrxTVSK6uaFwGO5</nProc><indProc>1</indProc></procRef></infAdic><exporta><UFSaidaPais>RS</UFSaidaPais><xLocExporta>xEb99u9TExujbhMIcO9u9ycsZAg2gtKzIFgsUogoVjuyDAhnlkZz3I5Hpccm</xLocExporta><xLocDespacho>xEb99u9TExujbhMIcO9u9ycsZAg2gtKzIFgsUogoVjuyDAhnlkZz3I5Hpccm</xLocDespacho></exporta><compra><xNEmp>abcefghijklmnopqrstuvx</xNEmp><xPed>1kG8gghJ0YTrUZnt00BJlOsFCtj43eV5mEHHXUzp3rD6QwwUwX4GPavXkMB1</xPed><xCont>9tQtearTIcXmO9vxNr3TPhSaItw5mk3zyTVlf2aIFXqqvtXrHoa0qPWKzUzc</xCont></compra><cana><safra>2013/2014</safra><ref>06/2013</ref><forDia dia=\"15\"><qtde>3</qtde></forDia><qTotMes>30.0000001</qTotMes><qTotAnt>10</qTotAnt><qTotGer>80</qTotGer><vFor>900.00</vFor><vTotDed>2000.70</vTotDed><vLiqFor>980.00</vLiqFor></cana></infNFe></NFe></enviNFe>";
Assert.assertEquals(xmlEsperado, loteEnvio.toString());
}
| loteEnvio.setNotas(Collections.singletonList(FabricaDeObjetosFake.getNFNota()));
|
1,815 | import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
<BUG>import java.util.Arrays;
public class FabricaDeObjetosFake {</BUG>
public static NFInformacaoImpostoDevolvido getNFInformacaoImpostoDevolvido() {
final NFInformacaoImpostoDevolvido informacaoImpostoDevolvido = new NFInformacaoImpostoDevolvido();
informacaoImpostoDevolvido.setValorIPIDevolvido(new BigDecimal("9999999999999.99"));
| import java.util.Collections;
public class FabricaDeObjetosFake {
|
1,816 | info.setEmitente(FabricaDeObjetosFake.getNFNotaInfoEmitente());
info.setEntrega(FabricaDeObjetosFake.getNFNotaInfoLocal());
info.setExportacao(FabricaDeObjetosFake.getNFNotaInfoExportacao());
info.setIdentificador("89172658591754401086218048846976493475937081");
info.setInformacoesAdicionais(FabricaDeObjetosFake.getNFNotaInfoInformacoesAdicionais());
<BUG>info.setPessoasAutorizadasDownloadNFe(Arrays.asList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
</BUG>
final NFNotaInfoItem item = new NFNotaInfoItem();
final NFNotaInfoItemImposto imposto = new NFNotaInfoItemImposto();
final NFNotaInfoItemImpostoCOFINS cofins = new NFNotaInfoItemImpostoCOFINS();
| info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
|
1,817 | imposto.setValorTotalTributos(new BigDecimal("999999999999.99"));
item.setImposto(imposto);
item.setNumeroItem(990);
item.setProduto(FabricaDeObjetosFake.getProdutoMedicamento());
item.setImpostoDevolvido(FabricaDeObjetosFake.getNFImpostoDevolvido());
<BUG>info.setItens(Arrays.asList(item));
info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal());</BUG>
info.setTotal(FabricaDeObjetosFake.getNFNotaInfoTotal());
info.setTransporte(FabricaDeObjetosFake.getNFNotaInfoTransporte());
info.setVersao(new BigDecimal("3.10"));
| info.setItens(Collections.singletonList(item));
info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal());
|
1,818 | identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO);
identificacao.setModelo(NFModelo.NFE);
identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ");
identificacao.setNumeroNota("999999999");
identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE);
<BUG>identificacao.setReferenciadas(Arrays.asList(referenciada));
</BUG>
identificacao.setSerie("999");
identificacao.setTipo(NFTipo.ENTRADA);
identificacao.setTipoEmissao(NFTipoEmissao.EMISSAO_NORMAL);
| identificacao.setReferenciadas(Collections.singletonList(referenciada));
|
1,819 | produtoMedicamento.setCfop("1302");
produtoMedicamento.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq");
produtoMedicamento.setCodigoDeBarras("36811963532505");
produtoMedicamento.setCodigoDeBarrasTributavel("36811963532505");
produtoMedicamento.setCampoeValorNota(NFProdutoCompoeValorNota.SIM);
<BUG>produtoMedicamento.setDeclaracoesImportacao(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacao()));
</BUG>
produtoMedicamento.setDescricao("OBS0ztekCoG0DSSVcQwPKRV2fV842Pye7mED13P4zoDczcXi4AMNvQ7BKBLnHtLc2Z9fuIY1pcKmXSK1IJQSLEs5QWvVGyC74DyJuIM0X7L0cqWPZQii5JtP");
produtoMedicamento.setExtipi("999");
produtoMedicamento.setNcm("99999999");
| produtoMedicamento.setDeclaracoesImportacao(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacao()));
|
1,820 | produtoMedicamento.setValorSeguro(new BigDecimal("999999999999.99"));
produtoMedicamento.setValorTotalBruto(new BigDecimal("999999999999.99"));
produtoMedicamento.setValorUnitario(new BigDecimal("9999999999.9999999999"));
produtoMedicamento.setValorUnitarioTributavel(new BigDecimal("9999999999.9999999999"));
produtoMedicamento.setVeiculo(FabricaDeObjetosFake.getNFNotaInfoItemProdutoVeiculo());
<BUG>produtoMedicamento.setNomeclaturaValorAduaneiroEstatistica(Arrays.asList("AZ0123"));
</BUG>
return produtoMedicamento;
}
public static NFNota getNFNota() {
| produtoMedicamento.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
|
1,821 | info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal());
info.setTotal(FabricaDeObjetosFake.getNFNotaInfoTotal());
info.setTransporte(FabricaDeObjetosFake.getNFNotaInfoTransporte());
info.setVersao(new BigDecimal("3.10"));
<BUG>info.setPessoasAutorizadasDownloadNFe(Arrays.asList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
</BUG>
return info;
}
public static NFNota getNotaQRCode(){
NFNota nota = new NFNota();
| info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
|
1,822 | identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO);
identificacao.setModelo(NFModelo.NFE);
identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ");
identificacao.setNumeroNota("999999999");
identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE);
<BUG>identificacao.setReferenciadas(Arrays.asList(FabricaDeObjetosFake.getNFInfoReferenciada()));
</BUG>
identificacao.setSerie("999");
identificacao.setTipo(NFTipo.ENTRADA);
identificacao.setTipoEmissao(NFTipoEmissao.EMISSAO_NORMAL);
| identificacao.setReferenciadas(Collections.singletonList(FabricaDeObjetosFake.getNFInfoReferenciada()));
|
1,823 | return compra;
}
public static NFNotaInfoCobranca getNFNotaInfoCobranca() {
final NFNotaInfoCobranca cobranca = new NFNotaInfoCobranca();
cobranca.setFatura(FabricaDeObjetosFake.getNFNotaInfoFatura());
<BUG>cobranca.setDuplicatas(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoDuplicata()));
</BUG>
return cobranca;
}
public static NFNotaInfoAvulsa getNFNotaInfoAvulsa() {
| cobranca.setDuplicatas(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoDuplicata()));
|
1,824 | </BUG>
produto.setDescricao("OBS0ztekCoG0DSSVcQwPKRV2fV842Pye7mED13P4zoDczcXi4AMNvQ7BKBLnHtLc2Z9fuIY1pcKmXSK1IJQSLEs5QWvVGyC74DyJuIM0X7L0cqWPZQii5JtP");
produto.setExtipi("999");
produto.setCodigoEspecificadorSituacaoTributaria("9999999");
<BUG>produto.setMedicamentos(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoMedicamento()));
</BUG>
produto.setNcm("99999999");
produto.setNumeroPedidoCliente("NNxQ9nrQ3HCe5Mc");
produto.setNumeroPedidoItemCliente(999999);
produto.setQuantidadeComercial(new BigDecimal("9999999999.9999"));
| produto.setCfop("1302");
produto.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq");
produto.setCodigoDeBarras("36811963532505");
produto.setCodigoDeBarrasTributavel("36811963532505");
produto.setCampoeValorNota(NFProdutoCompoeValorNota.SIM);
produto.setDeclaracoesImportacao(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacao()));
produto.setMedicamentos(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoMedicamento()));
|
1,825 | produto.setValorFrete(new BigDecimal("999999999999.99"));
produto.setValorOutrasDespesasAcessorias(new BigDecimal("999999999999.99"));
produto.setValorSeguro(new BigDecimal("999999999999.99"));
produto.setValorTotalBruto(new BigDecimal("999999999999.99"));
produto.setValorUnitario(new BigDecimal("9999999999.9999999999"));
<BUG>produto.setNomeclaturaValorAduaneiroEstatistica(Arrays.asList("AZ0123"));
</BUG>
produto.setValorUnitarioTributavel(new BigDecimal("9999999999.9999999999"));
return produto;
}
| produto.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
|
1,826 | medicamento.setQuantidade(new BigDecimal("9999999.999"));
return medicamento;
}
public static NFNotaInfoItemProdutoDeclaracaoImportacao getNFNotaInfoItemProdutoDeclaracaoImportacao() {
final NFNotaInfoItemProdutoDeclaracaoImportacao declaraoImportacao = new NFNotaInfoItemProdutoDeclaracaoImportacao();
<BUG>declaraoImportacao.setAdicoes(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacaoAdicao()));
</BUG>
declaraoImportacao.setCodigoExportador("E9jBqM65b0MiCiRnYil203iNGJOSZs8iU1KGmQsj2N0kw6QMuvhbsQosFGcU");
declaraoImportacao.setDataDesembaraco(new LocalDate(2014, 1, 1));
declaraoImportacao.setDataRegistro(new LocalDate(2014, 2, 2));
| declaraoImportacao.setAdicoes(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacaoAdicao()));
|
1,827 | public static NFNotaInfoVolume getNFNotaInfoVolume() {
final NFNotaInfoVolume volume = new NFNotaInfoVolume();
volume.setEspecieVolumesTransportados("3Qf46HFs7FcWlhuQqLJ96vsrgJHu6B5ZXmmwMZ1RtvQVOV4Yp6M9VNqn5Ecb");
final NFNotaInfoLacre notaInfoLacre = new NFNotaInfoLacre();
notaInfoLacre.setNumeroLacre("gvmjb9BB2cmwsLbzeR3Bsk8QbA7b1XEgXUhKeS9QZGiwhFnqDtEzS3377MP2");
<BUG>volume.setLacres(Arrays.asList(notaInfoLacre));
</BUG>
volume.setMarca("lc0w13Xw2PxsSD4u4q3N6Qix9ZuCFm0HXo6BxBmKnjVbh9Xwy3k9UwBNfuYo");
volume.setNumeracaoVolumesTransportados("mcBUtZwnI5DKj2YZNAcLP7W9h6j1xKmF5SX1BTKmsvyg0H5xSrfVw8HGn8eb");
volume.setPesoBruto(new BigDecimal("1.358"));
| volume.setLacres(Collections.singletonList(notaInfoLacre));
|
1,828 | public void deveGerarXMLDeAcordoComOPadraoEstabelecido() {
final NFLoteConsultaRetorno retorno = new NFLoteConsultaRetorno();
retorno.setAmbiente(NFAmbiente.HOMOLOGACAO);
retorno.setMotivo("8CwtnC5gWwUncMBYAZl9p4fvVx8RkCH2EKx2mtUNVA5tLoJsjNWL5CJ6DXNUHTWKpPl6fMKKxA0aXBu6IfmJLIHlPxtF0oZkKrNsGyGpwKqWxvDZ9HQGqscmhtTrp5NbNzk9TOsCJaMU59tF8kOxu0EUZAMLF8bGJteg86T4hQ6ej5Zi0n1Tin0vFAtN1ue68NWrfQWM11VPpqvSXRlaa8qIw1Qal8tWCFGJA0wZpl7eV98bAYL18pt3e71yKcX");
retorno.setNumeroRecibo("123456789012345");
<BUG>retorno.setProtocolos(Arrays.asList(FabricaDeObjetosFake.getNFProtocolo()));
</BUG>
retorno.setStatus("eeowo");
retorno.setUf(NFUnidadeFederativa.SC);
retorno.setVersao("3.10");
| retorno.setProtocolos(Collections.singletonList(FabricaDeObjetosFake.getNFProtocolo()));
|
1,829 | import org.picocontainer.*;
import org.picocontainer.defaults.AssignabilityRegistrationException;
import org.picocontainer.defaults.CachingComponentAdapter;
import org.picocontainer.defaults.ConstructorInjectionComponentAdapter;
import org.picocontainer.defaults.NotConcreteRegistrationException;
<BUG>public class ExtensionComponentAdapter implements LoadingOrder.Orderable, AssignableToComponentAdapter {
private Object myComponentInstance;</BUG>
private final String myImplementationClassName;
private final Element myExtensionElement;
private final PicoContainer myContainer;
| public static final ExtensionComponentAdapter[] EMPTY_ARRAY = new ExtensionComponentAdapter[0];
private Object myComponentInstance;
|
1,830 | private final LogProvider myLogger;
private final AreaInstance myArea;
private final String myName;
private final String myBeanClassName;
private final List<T> myExtensions = new CopyOnWriteArrayList<T>();
<BUG>private volatile T[] myExtensionsCache;
</BUG>
private final ExtensionsAreaImpl myOwner;
private final PluginDescriptor myDescriptor;
private final Set<ExtensionComponentAdapter> myExtensionAdapters = new LinkedHashSet<ExtensionComponentAdapter>();
| private volatile T[] myExtensionsArray;
|
1,831 | for (int i = 1; i < result.length; i++) {
assert result[i] != result[i - 1] : "Result: "+ Arrays.asList(result)+"; myExtensions: "+myExtensions+"; getExtensionClass()="+getExtensionClass()+"; size="+myExtensions.size()+";"+result.length;
}
return result;
}
<BUG>private synchronized void processAdapters() {
if (!myExtensionAdapters.isEmpty()) {
List<ExtensionComponentAdapter> allAdapters = new ArrayList<ExtensionComponentAdapter>(myExtensionAdapters.size() + myLoadedAdapters.size());
</BUG>
allAdapters.addAll(myExtensionAdapters);
| private void processAdapters() {
int totalSize = myExtensionAdapters.size() + myLoadedAdapters.size();
if (totalSize != 0) {
List<ExtensionComponentAdapter> allAdapters = new ArrayList<ExtensionComponentAdapter>(totalSize);
|
1,832 | public T getExtension() {
T[] extensions = getExtensions();
if (extensions.length == 0) return null;
return extensions[0];
}
<BUG>public boolean hasExtension(@NotNull T extension) {
processAdapters();
return myExtensions.contains(extension);</BUG>
}
public synchronized void unregisterExtension(@NotNull final T extension) {
| synchronized (this) {
return myExtensions.contains(extension);
|
1,833 | registry.start(pipelineContext);
processorService = new ProcessorService();
ProcessorDefinition processorDefinition = new ProcessorDefinition();
processorDefinition.setUri("oxf/processor/page-flow");
processorDefinition.addInput("controller", "oxf:/config/page-flow.xml");
<BUG>processorService.init(processorDefinition);
</BUG>
} catch (NamingException e) {
throw new OXFException(e);
}
| processorService.init(processorDefinition, null);
|
1,834 | package com.github.games647.changeskin.sponge.tasks;
import com.github.games647.changeskin.core.model.SkinData;
<BUG>import com.github.games647.changeskin.sponge.ChangeSkinSponge;
import java.util.UUID;</BUG>
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.entity.living.player.Player;
public class SkinDownloader implements Runnable {
| import com.google.common.base.Objects;
import java.util.UUID;
|
1,835 | this.targetUUID = targetSkin;
}
@Override
public void run() {
SkinData skin = plugin.getCore().getStorage().getSkin(targetUUID);
<BUG>if (skin == null) {
skin = plugin.getCore().getMojangSkinApi().downloadSkin(targetUUID);
}</BUG>
if (targetUUID.equals(receiver.getUniqueId())) {
| int updateDiff = plugin.getCore().getAutoUpdateDiff();
if (skin == null || (updateDiff > 0 && System.currentTimeMillis() - skin.getTimestamp() > updateDiff)) {
SkinData updatedSkin = plugin.getCore().getMojangSkinApi().downloadSkin(targetUUID);
if (!Objects.equal(updatedSkin, skin)) {
skin = updatedSkin;
|
1,836 | String database = getConfig().getString("storage.database");
String username = getConfig().getString("storage.username", "");
String password = getConfig().getString("storage.password", "");
int rateLimit = getConfig().getInt("mojang-request-limit");
boolean mojangDownload = getConfig().getBoolean("independent-skin-downloading");
<BUG>int cooldown = getConfig().getInt("cooldown");
this.core = new ChangeSkinCore(getLogger(), getDataFolder(), rateLimit, mojangDownload, cooldown);
</BUG>
SkinStorage storage = new SkinStorage(core, driver, host, port, database, username, password);
core.setStorage(storage);
| int updateDiff = getConfig().getInt("auto-skin-update");
this.core = new ChangeSkinCore(getLogger(), getDataFolder(), rateLimit, mojangDownload, cooldown, updateDiff);
|
1,837 | import com.github.games647.changeskin.core.ChangeSkinCore;
import com.github.games647.changeskin.core.NotPremiumException;
import com.github.games647.changeskin.core.RateLimitException;
import com.github.games647.changeskin.core.SkinStorage;
import com.github.games647.changeskin.core.model.SkinData;
<BUG>import com.github.games647.changeskin.core.model.UserPreference;
import java.util.List;</BUG>
import java.util.Random;
import java.util.UUID;
import org.spongepowered.api.event.Listener;
| import com.google.common.base.Objects;
import java.util.List;
|
1,838 | package com.github.games647.changeskin.bukkit.tasks;
import com.github.games647.changeskin.bukkit.ChangeSkinBukkit;
<BUG>import com.github.games647.changeskin.core.model.SkinData;
import java.util.UUID;</BUG>
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
| import com.google.common.base.Objects;
import java.util.UUID;
|
1,839 | private final File pluginFolder;
private SkinStorage storage;
private final List<SkinData> defaultSkins = Lists.newArrayList();
private final MojangSkinApi mojangSkinApi;
private final MojangAuthApi mojangAuthApi;
<BUG>private ConcurrentMap<UUID, Object> cooldowns;
private final List<Account> uploadAccounts = Lists.newArrayList();
public ChangeSkinCore(Logger logger, File pluginFolder, int rateLimit, boolean mojangDownload, int cooldown) {
this.logger = logger;</BUG>
this.pluginFolder = pluginFolder;
| private final int autoUpdateDiff;
public ChangeSkinCore(Logger logger, File pluginFolder, int rateLimit, boolean mojangDownload
, int cooldown, int autoUpdateDiff) {
this.logger = logger;
|
1,840 | this.mojangSkinApi = new MojangSkinApi(buildCache(10, -1), logger, rateLimit, mojangDownload);
this.mojangAuthApi = new MojangAuthApi(logger);
if (cooldown <= 0) {
cooldown = 1;
}
<BUG>cooldowns = buildCache(cooldown, -1);
}</BUG>
public Logger getLogger() {
return logger;
| this.cooldowns = buildCache(cooldown, -1);
this.autoUpdateDiff = autoUpdateDiff * 60 * 1_000;
|
1,841 | package com.github.games647.changeskin.bukkit.listener;
import com.github.games647.changeskin.bukkit.ChangeSkinBukkit;
import com.github.games647.changeskin.core.NotPremiumException;
import com.github.games647.changeskin.core.RateLimitException;
import com.github.games647.changeskin.core.model.SkinData;
<BUG>import com.github.games647.changeskin.core.model.UserPreference;
import java.util.UUID;</BUG>
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
| import com.google.common.base.Objects;
import java.util.UUID;
|
1,842 | package com.github.games647.changeskin.bungee.listener;
import com.github.games647.changeskin.bungee.ChangeSkinBungee;
import com.github.games647.changeskin.core.NotPremiumException;
import com.github.games647.changeskin.core.RateLimitException;
import com.github.games647.changeskin.core.model.SkinData;
<BUG>import com.github.games647.changeskin.core.model.UserPreference;
import java.util.List;</BUG>
import java.util.Random;
import java.util.UUID;
import java.util.logging.Level;
| import com.google.common.base.Objects;
import java.util.List;
|
1,843 | package com.github.games647.changeskin.bungee.listener;
<BUG>import com.github.games647.changeskin.bungee.ChangeSkinBungee;
import com.github.games647.changeskin.core.model.UserPreference;</BUG>
import java.util.UUID;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.PendingConnection;
| import com.github.games647.changeskin.core.model.SkinData;
import com.github.games647.changeskin.core.model.UserPreference;
|
1,844 | String pass = storageNode.getNode("password").getString();
int rateLimit = storageNode.getNode("mojang-request-limit").getInt();
boolean mojangDownload = storageNode.getNode("independent-skin-downloading").getBoolean();
java.util.logging.Logger pluginLogger = java.util.logging.Logger.getLogger("ChangeSkin");
int cooldown = rootNode.getNode("cooldown").getInt();
<BUG>File parentFolder = defaultConfigFile.getParentFile();
core = new ChangeSkinCore(pluginLogger, parentFolder, rateLimit, mojangDownload, cooldown);
</BUG>
SkinStorage storage = new SkinStorage(core, driver, host, port, database, user, pass);
core.setStorage(storage);
| int updateDiff = rootNode.getNode("auto-skin-update").getInt();
core = new ChangeSkinCore(pluginLogger, parentFolder, rateLimit, mojangDownload, cooldown, updateDiff);
|
1,845 | File configFile = saveDefaultResource("config.yml");
try {
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(configFile);
int rateLimit = configuration.getInt("mojang-request-limit");
boolean mojangDownload = configuration.getBoolean("independent-skin-downloading");
<BUG>int cooldown = configuration.getInt("cooldown");
core = new ChangeSkinCore(getLogger(), getDataFolder(), rateLimit, mojangDownload, cooldown);
</BUG>
loadLocale();
String driver = configuration.getString("storage.driver");
| int updateDiff = configuration.getInt("auto-skin-update");
core = new ChangeSkinCore(getLogger(), getDataFolder(), rateLimit, mojangDownload, cooldown, updateDiff);
|
1,846 | package com.github.games647.changeskin.bungee.tasks;
import com.github.games647.changeskin.bungee.ChangeSkinBungee;
<BUG>import com.github.games647.changeskin.core.model.SkinData;
import java.util.UUID;</BUG>
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer;
| import com.google.common.base.Objects;
import java.util.UUID;
|
1,847 | this.bukkitOp = bukkitOp;
}
@Override
public void run() {
SkinData newSkin = plugin.getStorage().getSkin(targetUUID);
<BUG>if (newSkin == null) {
newSkin = plugin.getCore().getMojangSkinApi().downloadSkin(targetUUID);
}</BUG>
if (targetUUID.equals(receiver.getUniqueId())) {
| int updateDiff = plugin.getCore().getAutoUpdateDiff();
if (newSkin == null || (updateDiff > 0 && System.currentTimeMillis() - newSkin.getTimestamp() > updateDiff)) {
SkinData updatedSkin = plugin.getCore().getMojangSkinApi().downloadSkin(targetUUID);
if (!Objects.equal(updatedSkin, newSkin)) {
newSkin = updatedSkin;
|
1,848 | import org.jboss.as.server.ServerEnvironment;
import org.jboss.as.server.Services;
import org.jboss.as.server.mgmt.HttpManagementService;
import org.jboss.as.server.services.net.NetworkInterfaceService;
import org.jboss.as.server.services.path.AbstractPathService;
<BUG>import org.jboss.dmr.ModelNode;
import org.jboss.msc.service.ServiceBuilder;</BUG>
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceTarget;
import org.jboss.threads.JBossThreadFactory;
| import org.jboss.logging.Logger;
import org.jboss.msc.service.ServiceBuilder;
|
1,849 | .addDependency(AbstractPathService.pathNameOf(ServerEnvironment.SERVER_TEMP_DIR), String.class, service.getTempDirInjector())
.addInjection(service.getPortInjector(), port)
.addInjection(service.getSecurePortInjector(), securePort)
.addInjection(service.getExecutorServiceInjector(), Executors.newCachedThreadPool(new JBossThreadFactory(new ThreadGroup("HttpManagementService-threads"), Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext())));
if (securityRealm != null) {
<BUG>builder.addDependency(SecurityRealmService.BASE_SERVICE_NAME.append(securityRealm), SecurityRealmService.class, service.getSecurityRealmInjector());
}</BUG>
builder.setInitialMode(ServiceController.Mode.ACTIVE)
.install();
}
| } else {
Logger.getLogger("org.jboss.as").warn("No security realm defined for http management service, all access will be unrestricted.");
|
1,850 | import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.LinkedList;
import java.util.List;
<BUG>import java.util.Properties;
import org.jboss.dmr.ModelNode;</BUG>
import org.jboss.msc.service.Service;
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
| import org.jboss.logging.Logger;
import org.jboss.dmr.ModelNode;
|
1,851 | .addInjection(service.getPortInjector(), port)
.addInjection(service.getSecurePortInjector(), securePort)
.addInjection(service.getExecutorServiceInjector(), Executors.newCachedThreadPool(httpMgmtThreads))
.addListener(verificationHandler);
if (securityRealm != null) {
<BUG>builder.addDependency(SecurityRealmService.BASE_SERVICE_NAME.append(securityRealm), SecurityRealmService.class, service.getSecurityRealmInjector());
}</BUG>
builder.setInitialMode(ServiceController.Mode.ACTIVE)
.install();
}
| } else {
Logger.getLogger("org.jboss.as").warn("No security realm defined for http management service, all access will be unrestricted.");
|
1,852 | import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.controller.remote.ManagementOperationHandlerFactory;
import org.jboss.as.controller.remote.AbstractModelControllerOperationHandlerFactoryService;
import org.jboss.as.controller.remote.ModelControllerClientOperationHandlerFactoryService;
import org.jboss.as.domain.management.SecurityRealm;
<BUG>import org.jboss.as.network.NetworkInterfaceBinding;
import org.jboss.msc.inject.Injector;</BUG>
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
| import org.jboss.logging.Logger;
import org.jboss.msc.inject.Injector;
|
1,853 | .addInjection(service.getTempDirInjector(), environment.getDomainTempDir().getAbsolutePath())
.addInjection(service.getPortInjector(), port)
.addInjection(service.getSecurePortInjector(), securePort)
.addInjection(service.getExecutorServiceInjector(), Executors.newCachedThreadPool(httpMgmtThreads));
if (securityRealm != null) {
<BUG>builder.addDependency(SecurityRealmService.BASE_SERVICE_NAME.append(securityRealm), SecurityRealmService.class, service.getSecurityRealmInjector());
}</BUG>
builder.setInitialMode(ServiceController.Mode.ACTIVE)
.install();
}
| } else {
Logger.getLogger("org.jboss.as").warn("No security realm defined for http management service, all access will be unrestricted.");
|
1,854 | .addDependency(AbstractPathService.pathNameOf(ServerEnvironment.SERVER_TEMP_DIR), String.class, service.getTempDirInjector())
.addInjection(service.getPortInjector(), port)
.addInjection(service.getSecurePortInjector(), securePort)
.addInjection(service.getExecutorServiceInjector(), Executors.newCachedThreadPool(new JBossThreadFactory(new ThreadGroup("HttpManagementService-threads"), Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext())));
if (securityRealm != null) {
<BUG>builder.addDependency(SecurityRealmService.BASE_SERVICE_NAME.append(securityRealm), SecurityRealmService.class, service.getSecurityRealmInjector());
}</BUG>
newControllers.add(builder.addListener(verificationHandler)
.setInitialMode(ServiceController.Mode.ACTIVE)
.install());
| } else {
Logger.getLogger("org.jboss.as").warn("No security realm defined for http management service, all access will be unrestricted.");
}
|
1,855 | public void setExceptionMessage(String exceptionMessage) {
this.exceptionMessage = exceptionMessage;
}
public String getExceptionMessage() {
return exceptionMessage;
<BUG>}
public void setStackTrace(String[] stackTraceList) {</BUG>
stackTrace = stackTraceList;
}
public String[] getStackTrace() {
| public String getNestedExceptionMessage() {
return nestedExceptionMessage;
public void setStackTrace(String[] stackTraceList) {
|
1,856 | package org.xwiki.test.ui.po.editor.wysiwyg;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.xwiki.test.ui.po.BaseElement;
public class MenuBarElement extends BaseElement
<BUG>{
private final WebElement container;</BUG>
public MenuBarElement(WebElement container)
{
this.container = container;
| private static final String MENU_ITEM_XPATH = "//td[contains(@class, 'gwt-MenuItem') and . = '%s']";
private final WebElement container;
|
1,857 | private boolean isMenuEnabled(WebElement menu)
{
return !menu.getAttribute("class").contains("gwt-MenuItem-disabled");
}
private void clickMenuWithLabel(String label)
<BUG>{
WebElement menu =
container.findElement(By.xpath("//td[contains(@class, 'gwt-MenuItem') and . = '" + label + "']"));
menu.click();</BUG>
}
| [DELETED] |
1,858 | import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.xwiki.test.ui.po.BaseElement;
public class EditorElement extends BaseElement
<BUG>{
private final String fieldId;</BUG>
private MenuBarElement menuBar;
private ToolBarElement toolBar;
public EditorElement(String fieldId)
| private static final String TAB_ITEM_XPATH = "//div[@role = 'tab' and . = '%s']";
private final String fieldId;
|
1,859 | return toolBar;
}
public RichTextAreaElement getRichTextArea()
{
return new RichTextAreaElement(getContainer().findElement(By.className("gwt-RichTextArea")));
<BUG>}
public EditorElement waitToLoad()</BUG>
{
getUtil().waitUntilCondition(new ExpectedCondition<WebElement>()
{
| public WebElement getSourceTextArea()
return getContainer().findElement(By.className("xPlainTextEditor"));
public EditorElement waitToLoad()
|
1,860 | import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
<BUG>import java.util.jar.Manifest;
import org.apache.maven.artifact.Artifact;</BUG>
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
| import org.apache.commons.io.IOUtils;
import org.apache.maven.artifact.Artifact;
|
1,861 |
if (resourceAsStream == null) {
throw new IllegalArgumentException("resourceAsStream may not be null");</BUG>
}
<BUG>IContainer current = project;
for (int i = 0; i < fromPortableString.segmentCount() - 1; i++) {
String currentSegment = fromPortableString.segment(i);
</BUG>
IResource container = current.findMember(currentSegment);
| if (!bin.exists()) { // TODO - not sure why this exists...
bin.create(true, true, new NullProgressMonitor());
javaProject.setOutputLocation(bin.getFullPath(), new NullProgressMonitor());
public void createOrUpdateFile(IPath fileLocation, InputStream contents) throws CoreException {
if (contents == null) {
throw new IllegalArgumentException("resourceAsStream may not be null");
try {
for (int i = 0; i < fileLocation.segmentCount() - 1; i++) {
String currentSegment = fileLocation.segment(i);
|
1,862 | try {
servletDescriptor = getClass().getResourceAsStream("SimpleServlet.xml");
</BUG>
project.createOrUpdateFile(Path.fromPortableString("src/OSGI-INF/SimpleServlet.xml"), servletDescriptor);
<BUG>} finally {
IOUtils.closeQuietly(servletDescriptor);
}</BUG>
OsgiBundleManifest manifest = OsgiBundleManifest.symbolicName("test.bundle001").version("1.0.0.SNAPSHOT")
.name("Test bundle").serviceComponent("OSGI-INF/SimpleServlet.xml")
.importPackage("javax.servlet,org.apache.sling.api,org.apache.sling.api.servlets");
| MavenDependency slingApiDep = new MavenDependency().groupId("org.apache.sling")
.artifactId("org.apache.sling.api").version("2.2.0");
MavenDependency servletApiDep = new MavenDependency().groupId("javax.servlet").artifactId("servlet-api")
.version("2.4");
project.configureAsJavaProject(slingApiDep, servletApiDep);
InputStream simpleServlet = getClass().getResourceAsStream("SimpleServlet.java.v1.txt");
project.createOrUpdateFile(Path.fromPortableString("src/example/SimpleServlet.java"), simpleServlet);
InputStream servletDescriptor = getClass().getResourceAsStream("SimpleServlet.xml");
|
1,863 | try {
simpleServlet2 = getClass().getResourceAsStream("SimpleServlet.java.v2.txt");
</BUG>
project.createOrUpdateFile(Path.fromPortableString("src/example/SimpleServlet.java"), simpleServlet2);
<BUG>} finally {
IOUtils.closeQuietly(simpleServlet2);
}</BUG>
poller.pollUntil(new Callable<Void>() {
@Override
public Void call() throws HttpException, IOException {
| repo.assertGetIsSuccessful("simple-servlet", "Version 1");
return null;
}
}, nullValue(Void.class));
InputStream simpleServlet2 = getClass().getResourceAsStream("SimpleServlet.java.v2.txt");
|
1,864 | wstServer.waitForServerToStart();
IProject contentProject = projectRule.getProject();
ProjectAdapter project = new ProjectAdapter(contentProject);
project.addNatures("org.eclipse.wst.common.project.facet.core.nature");
InputStream contentXml = getClass().getResourceAsStream("content-nested-structure.xml");
<BUG>try {
project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en.xml"),
contentXml);
} finally {
IOUtils.closeQuietly(contentXml);
}</BUG>
project.installFacet("sling.content", "1.0");
| project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en.xml"), contentXml);
|
1,865 | File logDir = new File(logPath);
DataLogCleaner.cleanDataLogDir(dataDir);
DataLogCleaner.cleanDataLogDir(logDir);
dataDir.mkdirs();
logDir.mkdirs();
<BUG>ZkServer zkServer = new ZkServer(dataPath, logPath, new EmptyNameSpace(), port,
ZkServer.DEFAULT_TICK_TIME, 100);</BUG>
zkServer.start();
return zkServer;
}
| ZkServer zkServer = new ZkServer(dataPath, logPath, port,
ZkServer.DEFAULT_TICK_TIME, 100);
|
1,866 | import com.github.zkclient.ZkClient;
import com.github.zkclient.exception.ZkNoNodeException;
import com.github.zkclient.exception.ZkNodeExistsException;
import com.sohu.jafka.cluster.Broker;
import com.sohu.jafka.cluster.Cluster;
<BUG>import com.sohu.jafka.consumer.TopicCount;
public class ZkUtils {</BUG>
public static final String ConsumersPath = "/consumers";
public static final String BrokerIdsPath = "/brokers/ids";
public static final String BrokerTopicsPath = "/brokers/topics";
| import static com.sohu.jafka.utils.Utils.*;
public class ZkUtils {
|
1,867 | chart.addYAxisLabels(AxisLabelsFactory.newAxisLabels(labels));
chart.addXAxisLabels(AxisLabelsFactory.newNumericRangeAxisLabels(0, max));
chart.setBarWidth(BarChart.AUTO_RESIZE);
chart.setSize(600, 500);
chart.setHorizontal(true);
<BUG>chart.setTitle("Total Evaluations by User");
showChartImg(resp, chart.toURLString());
}</BUG>
private List<Entry<String, Integer>> sortEntries(Collection<Entry<String, Integer>> entries) {
List<Entry<String, Integer>> result = new ArrayList<Entry<String, Integer>>(entries);
| chart.setDataEncoding(DataEncoding.TEXT);
return chart;
}
|
1,868 | checkEvaluationsEqual(eval4, foundissueProto.getEvaluations(0));
checkEvaluationsEqual(eval5, foundissueProto.getEvaluations(1));
}
public void testGetRecentEvaluationsNoneFound() throws Exception {
DbIssue issue = createDbIssue("fad", persistenceHelper);
<BUG>DbEvaluation eval1 = createEvaluation(issue, "someone", 100);
DbEvaluation eval2 = createEvaluation(issue, "someone", 200);
DbEvaluation eval3 = createEvaluation(issue, "someone", 300);
issue.addEvaluations(eval1, eval2, eval3);</BUG>
getPersistenceManager().makePersistent(issue);
| [DELETED] |
1,869 | public int read() throws IOException {
return inputStream.read();
}
});
}
<BUG>}
protected DbEvaluation createEvaluation(DbIssue issue, String who, long when) {</BUG>
DbUser user;
Query query = getPersistenceManager().newQuery("select from " + persistenceHelper.getDbUserClass().getName()
+ " where openid == :myopenid");
| @SuppressWarnings({"unchecked"})
protected DbEvaluation createEvaluation(DbIssue issue, String who, long when) {
|
1,870 | eval.setComment("my comment");
eval.setDesignation("MUST_FIX");
eval.setIssue(issue);
eval.setWhen(when);
eval.setWho(user.createKeyObject());
<BUG>eval.setEmail(who);
return eval;</BUG>
}
protected PersistenceManager getPersistenceManager() {
return testHelper.getPersistenceManager();
| issue.addEvaluation(eval);
return eval;
|
1,871 | Matcher ipDomainMatcher = IP_DOMAIN_PATTERN.matcher(domain);
if (ipDomainMatcher.matches()) {
InetAddressValidator inetAddressValidator =
InetAddressValidator.getInstance();
return inetAddressValidator.isValid(ipDomainMatcher.group(1));
<BUG>} else {
DomainValidator domainValidator =
DomainValidator.getInstance(allowLocal);
return domainValidator.isValid(domain) ||
domainValidator.isValidTld(domain);</BUG>
}
| [DELETED] |
1,872 | <BUG>package org.openstreetmap.josm.data.validation.routines;
public class InetAddressValidator extends AbstractValidator {
private static final String IPV4_REGEX =
"^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$";
private static final InetAddressValidator VALIDATOR = new InetAddressValidator();</BUG>
private final RegexValidator ipv4Validator = new RegexValidator(IPV4_REGEX);
| import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
private static final int IPV4_MAX_OCTET_VALUE = 255;
private static final int MAX_UNSIGNED_SHORT = 0xffff;
private static final int BASE_16 = 16;
private static final int IPV6_MAX_HEX_GROUPS = 8;
private static final int IPV6_MAX_HEX_DIGITS_PER_GROUP = 4;
private static final InetAddressValidator VALIDATOR = new InetAddressValidator();
|
1,873 | }
}
return true;
<BUG>}
}
</BUG>
| for (String ipSegment : groups) {
if (ipSegment == null || ipSegment.isEmpty()) {
return false;
|
1,874 | }
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
}
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)
<BUG>throws SQLException {
final List<ODocument> records = new ArrayList<ODocument>();
final OFunction f = metadata.getFunctionLibrary().getFunction(procedureNamePattern);
</BUG>
for (String p : f.getParameters()) {
| public String getUserName() throws SQLException {
database.activateOnCurrentThread();
return database.getUser().getName();
|
1,875 | doc.field("DATA_TYPE", java.sql.Types.OTHER);
doc.field("SPECIFIC_NAME", f.getName());
records.add(doc);</BUG>
}
<BUG>final ODocument doc = new ODocument();
doc.field("PROCEDURE_CAT", (Object) null);
doc.field("PROCEDURE_SCHEM", (Object) null);
doc.field("PROCEDURE_NAME", f.getName());
doc.field("COLUMN_NAME", "return");
doc.field("COLUMN_TYPE", procedureColumnReturn);
doc.field("DATA_TYPE", java.sql.Types.OTHER);
doc.field("SPECIFIC_NAME", f.getName());
records.add(doc);</BUG>
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
| final List<ODocument> records = new ArrayList<ODocument>();
for (String fName : database.getMetadata().getFunctionLibrary().getFunctionNames()) {
final ODocument doc = new ODocument()
.field("PROCEDURE_CAT", (Object) null)
.field("PROCEDURE_SCHEM", (Object) null)
.field("PROCEDURE_NAME", fName)
.field("REMARKS", "")
.field("PROCEDURE_TYPE", procedureResultUnknown)
.field("SPECIFIC_NAME", fName);
records.add(doc);
|
1,876 | final String type;
if (OMetadata.SYSTEM_CLUSTER.contains(cls.getName()))
type = "SYSTEM TABLE";
else
type = "TABLE";
<BUG>if (tableTypes.contains(type) && (tableNamePattern == null
|| tableNamePattern.equals("%") || tableNamePattern.equalsIgnoreCase(className))) {
</BUG>
final ODocument doc = new ODocument()
.field("TABLE_CAT", database.getName())
| if (tableTypes.contains(type) &&
(tableNamePattern == null || tableNamePattern.equals("%") || tableNamePattern.equalsIgnoreCase(className))) {
|
1,877 | }
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
}
@Override
<BUG>public ResultSet getSchemas() throws SQLException {
final List<ODocument> records = new ArrayList<ODocument>();
records.add(new ODocument().field("TABLE_SCHEM", database.getName())
.field("TABLE_CATALOG", database.getName()));</BUG>
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
| [DELETED] |
1,878 | records.add(new ODocument().field("TABLE_SCHEM", database.getName())
.field("TABLE_CATALOG", database.getName()));</BUG>
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
}
<BUG>public ResultSet getCatalogs() throws SQLException {
final List<ODocument> records = new ArrayList<ODocument>();</BUG>
records.add(new ODocument().field("TABLE_CAT", database.getName()));
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
| @Override
public ResultSet getSchemas() throws SQLException {
database.activateOnCurrentThread();
final List<ODocument> records = new ArrayList<ODocument>();
records.add(new ODocument()
.field("TABLE_CATALOG", database.getName()));
|
1,879 | }
final List<ODocument> records = new ArrayList<ODocument>();
for (OIndex<?> unique : uniqueIndexes) {
int keyFiledSeq = 1;
for (String keyFieldName : unique.getDefinition().getFields()) {
<BUG>ODocument doc = new ODocument();
doc.field("TABLE_CAT", catalog);
doc.field("TABLE_SCHEM", catalog);
doc.field("TABLE_NAME", table);
doc.field("COLUMN_NAME", keyFieldName);
doc.field("KEY_SEQ", Integer.valueOf(keyFiledSeq), OType.INTEGER);
doc.field("PK_NAME", unique.getName());
keyFiledSeq++;</BUG>
records.add(doc);
| return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
|
1,880 | if (!unique || oIndex.getType().equals(INDEX_TYPE.UNIQUE.name()))
indexes.add(oIndex);
}
final List<ODocument> records = new ArrayList<ODocument>();
for (OIndex<?> idx : indexes) {
<BUG>boolean notUniqueIndex = !( idx.getType().equals(INDEX_TYPE.UNIQUE.name()));
final String fieldNames = idx.getDefinition().getFields().toString();</BUG>
ODocument doc = new ODocument()
.field("TABLE_CAT", catalog)
.field("TABLE_SCHEM", schema)
| boolean notUniqueIndex = !(idx.getType().equals(INDEX_TYPE.UNIQUE.name()));
final String fieldNames = idx.getDefinition().getFields().toString();
|
1,881 | doc.field("DATA_TYPE", java.sql.Types.OTHER);
doc.field("SPECIFIC_NAME", f.getName());
records.add(doc);</BUG>
}
<BUG>final ODocument doc = new ODocument();
doc.field("FUNCTION_CAT", (Object) null);
doc.field("FUNCTION_SCHEM", (Object) null);
doc.field("FUNCTION_NAME", f.getName());
doc.field("COLUMN_NAME", "return");
doc.field("COLUMN_TYPE", procedureColumnReturn);
doc.field("DATA_TYPE", java.sql.Types.OTHER);
doc.field("SPECIFIC_NAME", f.getName());
records.add(doc);</BUG>
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
| final List<ODocument> records = new ArrayList<ODocument>();
for (OClass cls : classes) {
final ODocument doc = new ODocument()
.field("TYPE_CAT", (Object) null)
.field("TYPE_SCHEM", (Object) null)
.field("TYPE_NAME", cls.getName())
.field("CLASS_NAME", cls.getName())
.field("DATA_TYPE", java.sql.Types.STRUCT)
.field("REMARKS", (Object) null);
records.add(doc);
|
1,882 | package com.orientechnologies.orient.jdbc;
import com.orientechnologies.orient.core.id.ORecordId;
import org.junit.Test;
import java.math.BigDecimal;
<BUG>import java.sql.Date;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.sql.Types;</BUG>
import java.util.Calendar;
| import java.sql.*;
|
1,883 | import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.sql.Types;</BUG>
import java.util.Calendar;
import java.util.TimeZone;
<BUG>import static java.sql.Types.*;
import static org.assertj.core.api.Assertions.*;
</BUG>
public class OrientJdbcResultSetMetaDataTest extends OrientJdbcBaseTest {
| package com.orientechnologies.orient.jdbc;
import com.orientechnologies.orient.core.id.ORecordId;
import org.junit.Test;
import java.math.BigDecimal;
import java.sql.*;
import static java.sql.Types.BIGINT;
import static org.assertj.core.api.Assertions.assertThat;
|
1,884 | import com.orientechnologies.orient.core.db.record.ORecordLazyMultiValue;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.OBlob;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.functions.ODefaultSQLFunctionFactory;
<BUG>import com.orientechnologies.orient.core.sql.parser.OIdentifier;
import com.orientechnologies.orient.core.sql.parser.OProjectionItem;
import com.orientechnologies.orient.core.sql.parser.OSelectStatement;
import com.orientechnologies.orient.core.sql.parser.OrientSql;
import com.orientechnologies.orient.core.sql.parser.ParseException;</BUG>
import java.io.ByteArrayInputStream;
| import com.orientechnologies.orient.core.sql.parser.*;
|
1,885 | if (fields.isEmpty()) {
fields.addAll(Arrays.asList(document.fieldNames()));
}
return fields;
}
<BUG>private void activateDatabaseOnCurrentThread() {
statement.database.activateOnCurrentThread();</BUG>
}
public void close() throws SQLException {
cursor = 0;
| if (!statement.database.isActiveOnCurrentThread())
statement.database.activateOnCurrentThread();
|
1,886 | else if (rawResult instanceof Collection)
return ((Collection) rawResult).size();
return 0;
}
protected <RET> RET executeCommand(OCommandRequest query) throws SQLException {
<BUG>try {
return database.command(query).execute();</BUG>
} catch (OQueryParsingException e) {
throw new SQLSyntaxErrorException("Error while parsing command", e);
} catch (OException e) {
| database.activateOnCurrentThread();
return database.command(query).execute();
|
1,887 | import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
<BUG>import static org.assertj.core.api.Assertions.assertThat;
public class OrientDataSourceTest extends OrientJdbcBaseTest {</BUG>
@Test
public void shouldConnect() throws SQLException {
OrientDataSource ds = new OrientDataSource();
| import static org.assertj.core.api.Assertions.fail;
public class OrientDataSourceTest extends OrientJdbcBaseTest {
|
1,888 | assertThat(rs.first()).isTrue();
assertThat(rs.getString("stringKey")).isEqualTo("1");
rs.close();
statement.close();
conn.close();
<BUG>assertThat(conn.isClosed()).isTrue();
}</BUG>
return Boolean.TRUE;
}
};
| } catch (Exception e) {
e.printStackTrace();
fail("WTF:::", e);
|
1,889 | ExecutorService pool = Executors.newCachedThreadPool();
pool.submit(dbClient);
pool.submit(dbClient);
pool.submit(dbClient);
pool.submit(dbClient);
<BUG>TimeUnit.SECONDS.sleep(2);
</BUG>
queryTheDb.set(false);
pool.shutdown();
}
| TimeUnit.SECONDS.sleep(5);
|
1,890 | import java.util.Map;
import java.util.Set;</BUG>
import static org.assertj.core.api.Assertions.assertThat;
<BUG>import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
</BUG>
public class OrientJdbcDatabaseMetaDataTest extends OrientJdbcBaseTest {
| import org.junit.Test;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.*;
import static org.junit.Assert.*;
|
1,891 | assertEquals("OrientDB", metaData.getDatabaseProductName());
assertEquals(OConstants.ORIENT_VERSION, metaData.getDatabaseProductVersion());
assertEquals(2, metaData.getDatabaseMajorVersion());
assertEquals(2, metaData.getDatabaseMinorVersion());
assertEquals("OrientDB JDBC Driver", metaData.getDriverName());
<BUG>assertEquals("OrientDB "+OConstants.getVersion()+" JDBC Driver", metaData.getDriverVersion());
</BUG>
assertEquals(2, metaData.getDriverMajorVersion());
assertEquals(2, metaData.getDriverMinorVersion());
}
| assertEquals("OrientDB " + OConstants.getVersion() + " JDBC Driver", metaData.getDriverVersion());
|
1,892 | final String keywordsStr = metaData.getSQLKeywords();
assertNotNull(keywordsStr);
assertThat(Arrays.asList(keywordsStr.toUpperCase().split(",\\s*"))).contains("TRAVERSE");
}
@Test
<BUG>public void shouldRetrieveUniqueIndexInfoForTable() throws Exception {
ResultSet indexInfo = metaData.getIndexInfo("OrientJdbcDatabaseMetaDataTest", "OrientJdbcDatabaseMetaDataTest", "Item", true, false);
indexInfo.next();</BUG>
assertThat(indexInfo.getString("INDEX_NAME")).isEqualTo("Item.intKey");
assertThat(indexInfo.getBoolean("NON_UNIQUE")).isFalse();
| ResultSet indexInfo = metaData
indexInfo.next();
|
1,893 | package net.osmand.plus;
<BUG>import net.osmand.IProgress;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;</BUG>
import android.content.DialogInterface.OnCancelListener;
| import android.app.Activity;
import android.content.ContextWrapper;
import android.content.DialogInterface;
|
1,894 | public void handleMessage(Message msg) {
super.handleMessage(msg);
if(dialog != null){
dialog.setMessage(message);
if (isIndeterminate()) {
<BUG>dialog.setMax(0);
</BUG>
dialog.setIndeterminate(true);
} else {
dialog.setIndeterminate(false);
| dialog.setMax(1);
|
1,895 | }
run.start();
}
@Override
public void progress(int deltaWork) {
<BUG>this.progress += deltaWork;
if (!isIndeterminate() && dialog != null) {
dialog.setProgress(this.progress);
}</BUG>
}
| setDialog(dlg);
mViewUpdateHandler = new Handler(){
|
1,896 | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
<BUG>import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;</BUG>
public final class PatchUtils {
| import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
1,897 | package org.jboss.as.patching.runner;
<BUG>import org.jboss.as.boot.DirectoryStructure;
import org.jboss.as.patching.LocalPatchInfo;</BUG>
import org.jboss.as.patching.PatchInfo;
import org.jboss.as.patching.PatchLogger;
import org.jboss.as.patching.PatchMessages;
| import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp;
import org.jboss.as.patching.CommonAttributes;
import org.jboss.as.patching.LocalPatchInfo;
|
1,898 | private static final String PATH_DELIMITER = "/";
public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;
enum Element {
ADDED_BUNDLE("added-bundle"),
ADDED_MISC_CONTENT("added-misc-content"),
<BUG>ADDED_MODULE("added-module"),
BUNDLES("bundles"),</BUG>
CUMULATIVE("cumulative"),
DESCRIPTION("description"),
MISC_FILES("misc-files"),
| APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
1,899 | final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
<BUG>case APPLIES_TO_VERSION:
builder.addAppliesTo(value);
break;</BUG>
case RESULTING_VERSION:
if(type == Patch.PatchType.CUMULATIVE) {
| [DELETED] |
1,900 | final StringBuilder path = new StringBuilder();
for(final String p : item.getPath()) {
path.append(p).append(PATH_DELIMITER);
}
path.append(item.getName());
<BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());
if(type != ModificationType.REMOVE) {</BUG>
writer.writeAttribute(Attribute.HASH.name, bytesToHexString(item.getContentHash()));
}
if(type != ModificationType.ADD) {
| if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.