id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
32533210_23 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger( EncryptedKeyElementTest.class )",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger( EncryptedKeyElementTest.class );",
"type": "Logger",
"var_name": "LOG"
}
],
"fi... | {
"body": "@Test\n public void testSomeMethod()\n throws FileNotFoundException, XPathExpressionException, SAXException\n {\n EncryptedKeyElement encKey;\n EncryptedDataElement encDat;\n encKey = null;\n List<Element> encKeya = new ArrayList<Element>();\n try\n {\... | {
"fields": [
{
"declarator": "m_ReferenceElementList",
"modifier": "private final",
"original_string": "private final List<AbstractRefElement> m_ReferenceElementList;",
"type": "List<AbstractRefElement>",
"var_name": "m_ReferenceElementList"
},
{
"declarator": "m_Enwra... | {
"body": "public List<AbstractRefElement> getReferenceElementList()\n {\n return m_ReferenceElementList;\n }",
"class_method_signature": "EncryptedKeyElement.getReferenceElementList()",
"constructor": false,
"full_signature": "public List<AbstractRefElement> getReferenceElementList()",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_136 | {
"fields": [
{
"declarator": "IP = \"127.0.0.1\"",
"modifier": "final private static",
"original_string": "final private static String IP = \"127.0.0.1\";",
"type": "String",
"var_name": "IP"
},
{
"declarator": "expectedResponseBody =\n String.format( \"<html><h... | {
"body": "@Test\n public void testDetectIP()\n throws Exception\n {\n AbstractOptionVarchar url = new OptionSimpleVarchar( \"URL\", \"value\" );\n AbstractOptionInteger port = new OptionSimpleInteger( \"Port\", 8080 );\n HttpClient mock = createMock( HttpClient.class );\n exp... | {
"fields": [
{
"declarator": "URL = \"http://showip.net\"",
"modifier": "private static final",
"original_string": "private static final String URL = \"http://showip.net\";",
"type": "String",
"var_name": "URL"
},
{
"declarator": "AUTO = String.format( \"Detect your IP... | {
"body": "public String detectIP()\n {\n String ip = null;\n\n // Create a method instance.\n GetMethod method = new GetMethod( URL );\n\n // Provide custom retry handler is necessary\n // method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new\n // DefaultHtt... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_58 | {
"fields": [
{
"declarator": "notPossibleState = new PossibleState()",
"modifier": "private final",
"original_string": "private final PossibleState notPossibleState = new PossibleState();",
"type": "PossibleState",
"var_name": "notPossibleState"
}
],
"file": "libs/Intelligen... | {
"body": "@Test\n public void revalidateOkTest()\n {\n IntelligentDoSLibraryImpl impl = Mockito.mock( IntelligentDoSLibraryImpl.class );\n\n // --> TAMPERED\n AttackModel attackModel = create( RequestType.TAMPERED, \"\" );\n notPossibleState.update( impl, attackModel );\n ver... | {
"fields": [
{
"declarator": "RESENDS = 1",
"modifier": "private static final",
"original_string": "private static final int RESENDS = 1;",
"type": "int",
"var_name": "RESENDS"
},
{
"declarator": "minParamItem = new CommonParamItem( 1, 1, 1000 )",
"modifier": "pr... | {
"body": "@Override\n public void update( IntelligentDoSLibraryImpl STATE_CONTEXT, AttackModel attackModel )\n {\n switch ( verify )\n {\n case NONE:\n reference = attackModel;\n\n if ( attackModel.isAllSOAPFault() )\n {\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_19 | {
"fields": [
{
"declarator": "m_SchemaAnalyser",
"modifier": "private static",
"original_string": "private static SchemaAnalyzer m_SchemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "m_SchemaAnalyser"
},
{
"declarator": "log",
"modifier": "private static",
... | {
"body": "@Test\n public void testGetAvoidedFile()\n {\n /*\n * System.out.println(\"getAvoidedFile\"); AttackManager instance = null; Document expResult = null; Document\n * result = instance.getAvoidedFile(); assertEquals(expResult, result); // TODO review the generated test code\n ... | {
"fields": [
{
"declarator": "m_DetectionReport",
"modifier": "private final",
"original_string": "private final DetectionReport m_DetectionReport;",
"type": "DetectionReport",
"var_name": "m_DetectionReport"
},
{
"declarator": "m_InputFile",
"modifier": "private... | {
"body": "public Document getAvoidedFile()\n {\n return m_AvoidedFile;\n }",
"class_method_signature": "AttackManager.getAvoidedFile()",
"constructor": false,
"full_signature": "public Document getAvoidedFile()",
"identifier": "getAvoidedFile",
"invocations": [],
"modifiers": "public",
"pa... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_1 | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/library/signatureWrapping/util/signature/weakness/PrefixRewriterTest.java",
"identifier": "PrefixRewriterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRewritePrefix_with_untouched_Elements()\n {\n Element payload = generatePayloadElementOfDummySamlDocument();\n Document saml = payload.getOwnerDocument();\n String docString = DomUtilities.domToString( saml, true );\n\n assertFalse( docString.contai... | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/main/java/wsattacker/library/signatureWrapping/util/signature/weakness/PrefixRewriter.java",
"identifier": "PrefixRewriter",
"interfaces": "",
"methods": [
{
"class_method_signature": "PrefixRewriter.rewritePrefix( Element element, String ... | {
"body": "public static void rewritePrefix( Element element, String oldPrefix, String newPrefix )\n {\n rewritePrefix( element, oldPrefix, newPrefix, new ArrayList<Element>( 0 ) );\n }",
"class_method_signature": "PrefixRewriter.rewritePrefix( Element element, String oldPrefix, String newPrefix )",
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_0 | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/library/signatureWrapping/util/signature/weakness/PrefixRewriterTest.java",
"identifier": "PrefixRewriterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRewritePrefix()\n {\n Document saml = generatePayloadElementOfDummySamlDocument().getOwnerDocument();\n String docString = DomUtilities.domToString( saml, true );\n\n assertFalse( docString.contains( \"<xyz:\" ) );\n assertTrue( docString.contains( ... | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/main/java/wsattacker/library/signatureWrapping/util/signature/weakness/PrefixRewriter.java",
"identifier": "PrefixRewriter",
"interfaces": "",
"methods": [
{
"class_method_signature": "PrefixRewriter.rewritePrefix( Element element, String ... | {
"body": "public static void rewritePrefix( Element element, String oldPrefix, String newPrefix )\n {\n rewritePrefix( element, oldPrefix, newPrefix, new ArrayList<Element>( 0 ) );\n }",
"class_method_signature": "PrefixRewriter.rewritePrefix( Element element, String oldPrefix, String newPrefix )",
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_18 | {
"fields": [
{
"declarator": "m_SchemaAnalyser",
"modifier": "private static",
"original_string": "private static SchemaAnalyzer m_SchemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "m_SchemaAnalyser"
},
{
"declarator": "log",
"modifier": "private static",
... | {
"body": "@Test\n public void testGetInputFile()\n {\n /*\n * System.out.println(\"getInputFile\"); AttackManager instance = null; Document expResult = null; Document result\n * = instance.getInputFile(); assertEquals(expResult, result); // TODO review the generated test code and remove\... | {
"fields": [
{
"declarator": "m_DetectionReport",
"modifier": "private final",
"original_string": "private final DetectionReport m_DetectionReport;",
"type": "DetectionReport",
"var_name": "m_DetectionReport"
},
{
"declarator": "m_InputFile",
"modifier": "private... | {
"body": "public Document getInputFile()\n {\n return m_InputFile;\n }",
"class_method_signature": "AttackManager.getInputFile()",
"constructor": false,
"full_signature": "public Document getInputFile()",
"identifier": "getInputFile",
"invocations": [],
"modifiers": "public",
"parameters":... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_59 | {
"fields": [
{
"declarator": "notPossibleState = new PossibleState()",
"modifier": "private final",
"original_string": "private final PossibleState notPossibleState = new PossibleState();",
"type": "PossibleState",
"var_name": "notPossibleState"
}
],
"file": "libs/Intelligen... | {
"body": "@Test\n public void minimalParamTest()\n {\n IntelligentDoSLibraryImpl impl = Mockito.mock( IntelligentDoSLibraryImpl.class );\n AttackModel value = new AttackModel();\n when( impl.createNewTampered( false ) ).thenReturn( value );\n\n // --> TAMPERED\n AttackModel a... | {
"fields": [
{
"declarator": "RESENDS = 1",
"modifier": "private static final",
"original_string": "private static final int RESENDS = 1;",
"type": "int",
"var_name": "RESENDS"
},
{
"declarator": "minParamItem = new CommonParamItem( 1, 1, 1000 )",
"modifier": "pr... | {
"body": "@Override\n public void update( IntelligentDoSLibraryImpl STATE_CONTEXT, AttackModel attackModel )\n {\n switch ( verify )\n {\n case NONE:\n reference = attackModel;\n\n if ( attackModel.isAllSOAPFault() )\n {\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_137 | {
"fields": [
{
"declarator": "schemaAnalyzer = SchemaAnalyzerFactory.getInstance( SchemaAnalyzerFactory.WEBSERVICE )",
"modifier": "private final",
"original_string": "private final SchemaAnalyzer schemaAnalyzer = SchemaAnalyzerFactory.getInstance( SchemaAnalyzerFactory.WEBSERVICE );",
"t... | {
"body": "@Test\n public void abc()\n {\n SchemaAnalyzerOption sao = new SchemaAnalyzerOption( null, xml, schemaAnalyzer );\n PropertyChangeEvent evt = new PropertyChangeEvent( this, CurrentRequest.PROP_WSDLREQUESTCONTENT, xml, xml );\n sao.propertyChange( evt );\n assertThat( sao.g... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "DEFAULT_SOAP_MESSAGE =\n \"<?xml v... | {
"body": "@Override\n public void propertyChange( PropertyChangeEvent evt )\n {\n final String propName = evt.getPropertyName();\n String create = DEFAULT_SOAP_MESSAGE;\n\n if ( CurrentRequest.PROP_WSDLREQUEST.equals( propName ) )\n {\n\n if ( evt.getNewValue() != null )\... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_22 | {
"fields": [
{
"declarator": "m_SchemaAnalyser",
"modifier": "private static",
"original_string": "private static SchemaAnalyzer m_SchemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "m_SchemaAnalyser"
},
{
"declarator": "log",
"modifier": "private static",
... | {
"body": "@Test\n public void testAttackOnEncKeyWithSignedEncData()\n throws Exception\n {\n Document doc = DomUtilities.readDocument( \"src/test/resources/schema_encKey_encData_sig.xml\" );\n Document possAvoidedDoc = null;\n EncSigWrappingOracle encSigWrappOracle = null;\n ... | {
"fields": [
{
"declarator": "m_DetectionReport",
"modifier": "private final",
"original_string": "private final DetectionReport m_DetectionReport;",
"type": "DetectionReport",
"var_name": "m_DetectionReport"
},
{
"declarator": "m_InputFile",
"modifier": "private... | {
"body": "public DetectionReport getDetectionReport()\n {\n return m_DetectionReport;\n }",
"class_method_signature": "AttackManager.getDetectionReport()",
"constructor": false,
"full_signature": "public DetectionReport getDetectionReport()",
"identifier": "getDetectionReport",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_75 | {
"fields": [
{
"declarator": "list",
"modifier": "private static",
"original_string": "private static SortedUniqueList<AbstractPlugin> list;",
"type": "SortedUniqueList<AbstractPlugin>",
"var_name": "list"
},
{
"declarator": "p1",
"modifier": "private static",
... | {
"body": "@Test\n public void add()\n {\n list.add( p1 );\n assertTrue( \"List should contain 1 Element\", list.size() == 1 );\n list.add( p2 );\n assertTrue( \"List should contain 2 Elements\", list.size() == 2 );\n list.add( p3 );\n assertTrue( \"List should contain ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "framework/src/main/java/wsattacker/util/SortedUniqueL... | {
"body": "@Override\n public void add( int index, T element )\n {\n return;\n }",
"class_method_signature": "SortedUniqueList.add( int index, T element )",
"constructor": false,
"full_signature": "@Override public void add( int index, T element )",
"identifier": "add",
"invocations": [],
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_63 | {
"fields": [
{
"declarator": "coerciveParsing = new CoerciveParsing()",
"modifier": "private final",
"original_string": "private final CoerciveParsing coerciveParsing = new CoerciveParsing();",
"type": "CoerciveParsing",
"var_name": "coerciveParsing"
}
],
"file": "libs/Intel... | {
"body": "@Test\n public void hasFurther()\n {\n assertThat( coerciveParsing.hasFurtherParams(), is( true ) );\n }",
"class_method_signature": "CoerciveParsingTest.hasFurther()",
"constructor": false,
"full_signature": "@Test public void hasFurther()",
"identifier": "hasFurther",
"invocatio... | {
"fields": [
{
"declarator": "possiblePossitions = { PayloadPosition.ELEMENT }",
"modifier": "private final",
"original_string": "private final PayloadPosition[] possiblePossitions = { PayloadPosition.ELEMENT };",
"type": "PayloadPosition[]",
"var_name": "possiblePossitions"
},
... | {
"body": "@Override\n public boolean hasFurtherParams()\n {\n return numberOfTags.hasNext() || tagNameIterator.hasNext();\n }",
"class_method_signature": "CoerciveParsing.hasFurtherParams()",
"constructor": false,
"full_signature": "@Override public boolean hasFurtherParams()",
"identifier": ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_121 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX33XTest.java",
"identifier": "CollisionDJBX33XTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGenNCollisions()\n {\n System.out.println( \"Test genNCollisions-DJBX33X - 4 elements\" );\n int numberAttributes = 4;\n StringBuilder sb = new StringBuilder();\n CollisionDJBX33X instance = new CollisionDJBX33X();\n instance.genNCollisions( ... | {
"fields": [],
"file": "plugins/Denial_of_Service/src/main/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX33X.java",
"identifier": "CollisionDJBX33X",
"interfaces": "implements CollisionInterface",
"methods": [
{
"class_method_signature": "CollisionDJBX33X.getHash( Strin... | {
"body": "@Override\n public void genNCollisions( int n, StringBuilder sb, boolean useNamespace )\n {\n try\n {\n // Open the file\n InputStream is = getClass().getResourceAsStream( \"/DJBX33XCollisions/DJBX33XCollisions.txt\" );\n BufferedReader br = new Buffered... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_34 | {
"fields": [
{
"declarator": "successfulState = new SuccessfulState()",
"modifier": "private final",
"original_string": "private final SuccessfulState successfulState = new SuccessfulState();",
"type": "SuccessfulState",
"var_name": "successfulState"
}
],
"file": "libs/Intel... | {
"body": "@Test\n public void testSuccessfulWithNoFurther()\n {\n IntelligentDoSLibraryImpl context = mock( IntelligentDoSLibraryImpl.class );\n\n SuccessDecider sd = mock( SuccessDecider.class );\n when( sd.wasSuccessful( new Long[0], new Long[0] ) ).thenReturn( true );\n\n when( c... | {
"fields": [
{
"declarator": "logger = Logger.getLogger( getClass() )",
"modifier": "private final",
"original_string": "private final Logger logger = Logger.getLogger( getClass() );",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "untampered",
"modif... | {
"body": "@Override\n public void update( final IntelligentDoSLibraryImpl STATE_CONTEXT, final AttackModel attackModel )\n {\n\n SuccessDecider successDecider = STATE_CONTEXT.getSuccessDecider();\n\n if ( untampered == null )\n {\n untampered = attackModel;\n\n // che... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_43 | {
"fields": [],
"file": "libs/Intelligent_Denial_of_Service_Library/src/test/java/wsattacker/library/intelligentdos/position/MatcherPositionIteratorTest.java",
"identifier": "MatcherPositionIteratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void resetTest()\n {\n String xmlWithPlaceholder =\n \"<soapenv:Envelope>\" + \" <soapenv:Header>$$PAYLOADELEMENT$$</soapenv:Header>\" + \" <soapenv:Body>\"\n + \" <cxf:celsiusToFarenheit>\" + \" <arg0>1</arg0>\" + \" </cxf:celsius... | {
"fields": [
{
"declarator": "xmlWithPlaceholder",
"modifier": "private final",
"original_string": "private final String xmlWithPlaceholder;",
"type": "String",
"var_name": "xmlWithPlaceholder"
},
{
"declarator": "findingsMap = Maps.newHashMap()",
"modifier": "pr... | {
"body": "@Override\n public void reset()\n {\n for ( Entry<PayloadPosition, List<Finding>> entry : findingsMap.entrySet() )\n {\n findingsIteratorMap.put( entry.getKey(), entry.getValue().iterator() );\n }\n }",
"class_method_signature": "MatcherPositionIterator.reset()",
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_14 | {
"fields": [
{
"declarator": "save",
"modifier": "private static",
"original_string": "private static XPathWeaknessFactoryInterface save;",
"type": "XPathWeaknessFactoryInterface",
"var_name": "save"
}
],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/libr... | {
"body": "@Test\n public void xspresXPaths()\n {\n XPathAnalyser a;\n String xpath;\n\n xpath =\n \"/*[local-name()=\\\"Envelope\\\" and namespace-uri()=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\"][1]/*[local-name()=\\\"Body\\\" and namespace-uri()=\\\"http://schemas.xmlso... | {
"fields": [
{
"declarator": "xpathWeaknessFactory = new XPathWeaknessFactory()",
"modifier": "public static",
"original_string": "public static XPathWeaknessFactoryInterface xpathWeaknessFactory = new XPathWeaknessFactory();",
"type": "XPathWeaknessFactoryInterface",
"var_name": "x... | {
"body": "public boolean isPrefixfreeTransformedFastXPath()\n {\n for ( Step step : xpath.getRelativeLocationPaths() )\n {\n if ( !step.getAxisSpecifier().getAxisName().toFullString().equals( \"child\" ) )\n {\n return false;\n }\n if ( step... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_101 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "LogEntryRequest instance;",
"type": "LogEntryRequest",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryRequestTest.ja... | {
"body": "@Test\n public void testSetThreadNumber()\n {\n int threadNumber = 10;\n instance.setThreadNumber( threadNumber );\n }",
"class_method_signature": "LogEntryRequestTest.testSetThreadNumber()",
"constructor": false,
"full_signature": "@Test public void testSetThreadNumber()",
"... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
"type": "String",
"var_name": "type"
},
{
"declarator": "tsSend",
"modifier": "private",
"original_string": "private long tsSend;",
"typ... | {
"body": "public void setThreadNumber( int threadNumber )\n {\n this.threadNumber = threadNumber;\n }",
"class_method_signature": "LogEntryRequest.setThreadNumber( int threadNumber )",
"constructor": false,
"full_signature": "public void setThreadNumber( int threadNumber )",
"identifier": "setTh... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_117 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX33ATest.java",
"identifier": "CollisionDJBX33ATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetCollisionString()\n {\n System.out.println( \"Test getCollisionString-DJBX33A\" );\n int i = 4 - 1;\n int n = 2;\n CollisionDJBX33A instance = new CollisionDJBX33A();\n String expResult = \"C8C8\";\n String result = instance.getColl... | {
"fields": [],
"file": "plugins/Denial_of_Service/src/main/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX33A.java",
"identifier": "CollisionDJBX33A",
"interfaces": "implements CollisionInterface",
"methods": [
{
"class_method_signature": "CollisionDJBX33A.getHash( Strin... | {
"body": "@Override\n public String getCollisionString( int i, int n )\n {\n // init Bytes with collision Strings\n byte[] StringCollision0 = { 'A', 'z' };\n byte[] StringCollision1 = { 'C', '8' };\n\n // init empty ByteArray of correct Size for holding result!\n int numberEl... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_55 | {
"fields": [],
"file": "libs/Intelligent_Denial_of_Service_Library/src/test/java/wsattacker/library/intelligentdos/helper/IterateModelTest.java",
"identifier": "IterateModelTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void reset()\n {\n IterateModel iterateModel = IterateModel.custom().startAt( 10 ).stopAt( 11 ).build();\n\n for ( int i = 0; i < 2; i++ )\n {\n assertThat( iterateModel.hasNext(), is( true ) );\n assertThat( iterateModel.next(), is( 10 ) );\n... | {
"fields": [
{
"declarator": "UNSET = -1",
"modifier": "private static final",
"original_string": "private static final int UNSET = -1;",
"type": "int",
"var_name": "UNSET"
},
{
"declarator": "stop",
"modifier": "private",
"original_string": "private boolea... | {
"body": "public void reset()\n {\n currentValue = UNSET;\n stop = false;\n }",
"class_method_signature": "IterateModel.reset()",
"constructor": false,
"full_signature": "public void reset()",
"identifier": "reset",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"re... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_96 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "LogEntryRequest instance;",
"type": "LogEntryRequest",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryRequestTest.ja... | {
"body": "@Test\n public void testGetTsReceived()\n {\n long expResult = 200L;\n long result = instance.getTsReceived();\n assertEquals( expResult, result );\n }",
"class_method_signature": "LogEntryRequestTest.testGetTsReceived()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
"type": "String",
"var_name": "type"
},
{
"declarator": "tsSend",
"modifier": "private",
"original_string": "private long tsSend;",
"typ... | {
"body": "public long getTsReceived()\n {\n return tsReceived;\n }",
"class_method_signature": "LogEntryRequest.getTsReceived()",
"constructor": false,
"full_signature": "public long getTsReceived()",
"identifier": "getTsReceived",
"invocations": [],
"modifiers": "public",
"parameters": "(... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_79 | {
"fields": [
{
"declarator": "MESSAGE = \"\"\n + \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:ns1=\\\"http://sn1.com\\\">\"\n + \" <soapenv:Header>\" + \" <ns1:double/>\" + \" <ns1:ha>Header A</ns1:ha>\" + \" <ns1:hb/>\"\n + \" ... | {
"body": "@Test\n public void testStringToSoapCorrect()\n throws Exception\n {\n String msg = new String( MESSAGE );\n stringToSoap( msg );\n }",
"class_method_signature": "TestSoapUtilities.testStringToSoapCorrect()",
"constructor": false,
"full_signature": "@Test public void tes... | {
"fields": [
{
"declarator": "log = Logger.getLogger( SoapUtilities.class )",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger( SoapUtilities.class );",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "SO... | {
"body": "public static SOAPMessage stringToSoap( String soapString )\n throws SOAPException\n {\n byte[] bytes;\n try\n {\n bytes = soapString.getBytes( \"UTF-8\" );\n }\n catch ( UnsupportedEncodingException e )\n {\n log.fatal( \"### Error ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_80 | {
"fields": [
{
"declarator": "MESSAGE = \"\"\n + \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:ns1=\\\"http://sn1.com\\\">\"\n + \" <soapenv:Header>\" + \" <ns1:double/>\" + \" <ns1:ha>Header A</ns1:ha>\" + \" <ns1:hb/>\"\n + \" ... | {
"body": "@Test( expected = SOAPException.class )\n public void testStringToSoapBadFormated()\n throws Exception\n {\n String msg = new String( MESSAGE ).substring( 0, MESSAGE.length() - 2 ); // delete\n // last\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger( SoapUtilities.class )",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger( SoapUtilities.class );",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "SO... | {
"body": "public static SOAPMessage stringToSoap( String soapString )\n throws SOAPException\n {\n byte[] bytes;\n try\n {\n bytes = soapString.getBytes( \"UTF-8\" );\n }\n catch ( UnsupportedEncodingException e )\n {\n log.fatal( \"### Error ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_38 | {
"fields": [
{
"declarator": "xmlMessage =\n \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:axis=\\\"http://axis2.wsattacker\\\">\"\n + \" <soapenv:Header/>\" + \" <soapenv:Body>\" + \" <axis:reverser>\" + \" <!--Optional:-->\"\n... | {
"body": "@Test\n public void noExpansionPointTest()\n {\n String xmlMessage2 = \"<?xml version=\\\"1.0\\\"?><Envelope><Header></Header><Body></Body></Envelope>\";\n SchemaAnalyzerPositionIterator positionIterator =\n new SchemaAnalyzerPositionIterator( schemaAnalyzer, xmlMessage2 );\n... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger( SchemaAnalyzerPositionIterator.class )",
"modifier": "private final static",
"original_string": "private final static Logger LOG = Logger.getLogger( SchemaAnalyzerPositionIterator.class );",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public boolean hasNext( PayloadPosition payloadPosition )\n {\n Iterator<AnyElementProperties> iterator = anyElementIteratorMap.get( payloadPosition );\n if ( iterator != null )\n {\n return iterator.hasNext();\n }\n else\n {\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_33 | {
"fields": [
{
"declarator": "successfulState = new SuccessfulState()",
"modifier": "private final",
"original_string": "private final SuccessfulState successfulState = new SuccessfulState();",
"type": "SuccessfulState",
"var_name": "successfulState"
}
],
"file": "libs/Intel... | {
"body": "@Test\n public void testSecondResponse()\n {\n IntelligentDoSLibraryImpl context = mock( IntelligentDoSLibraryImpl.class );\n SuccessDecider sd = mock( SuccessDecider.class );\n when( context.getSuccessDecider() ).thenReturn( sd );\n when( sd.calculateRatio( null, new Long... | {
"fields": [
{
"declarator": "logger = Logger.getLogger( getClass() )",
"modifier": "private final",
"original_string": "private final Logger logger = Logger.getLogger( getClass() );",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "untampered",
"modif... | {
"body": "@Override\n public void update( final IntelligentDoSLibraryImpl STATE_CONTEXT, final AttackModel attackModel )\n {\n\n SuccessDecider successDecider = STATE_CONTEXT.getSuccessDecider();\n\n if ( untampered == null )\n {\n untampered = attackModel;\n\n // che... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_126 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "Clock instance;",
"type": "Clock",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/clock/ClockTest.java",
"identifier": "ClockTest",... | {
"body": "@Test\n public void testReset()\n {\n\n try\n {\n instance.update();\n Thread.sleep( 1000 );\n instance.update();\n }\n catch ( InterruptedException ex )\n {\n Logger.getLogger( ClockTest.class.getName() ).log( Level.SEVER... | {
"fields": [
{
"declarator": "startTime",
"modifier": "private",
"original_string": "private long startTime;",
"type": "long",
"var_name": "startTime"
}
],
"file": "plugins/Denial_of_Service/src/main/java/wsattacker/plugin/dos/dosExtension/clock/Clock.java",
"identifier": ... | {
"body": "public void reset()\n {\n startTime = System.currentTimeMillis();\n update();\n }",
"class_method_signature": "Clock.reset()",
"constructor": false,
"full_signature": "public void reset()",
"identifier": "reset",
"invocations": [
"currentTimeMillis",
"update"
],
"m... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_64 | {
"fields": [
{
"declarator": "coerciveParsing = new CoerciveParsing()",
"modifier": "private final",
"original_string": "private final CoerciveParsing coerciveParsing = new CoerciveParsing();",
"type": "CoerciveParsing",
"var_name": "coerciveParsing"
}
],
"file": "libs/Intel... | {
"body": "@Test\n public void minimalTest()\n throws ParserConfigurationException\n {\n\n PayloadPosition payloadPosition = PayloadPosition.ELEMENT;\n\n String xml = IDoSTestHelper.createTestString( payloadPosition );\n\n DoSAttack minimal = coerciveParsing.minimal();\n Strin... | {
"fields": [
{
"declarator": "possiblePossitions = { PayloadPosition.ELEMENT }",
"modifier": "private final",
"original_string": "private final PayloadPosition[] possiblePossitions = { PayloadPosition.ELEMENT };",
"type": "PayloadPosition[]",
"var_name": "possiblePossitions"
},
... | {
"body": "@Override\n public DoSAttack minimal()\n {\n CoerciveParsing coerciveParsing = new CoerciveParsing();\n coerciveParsing.currentNumberOfTags = MIN_NUMBER_OF_TAGS;\n coerciveParsing.currentTagName = \"x\";\n return coerciveParsing;\n }",
"class_method_signature": "Coerc... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_72 | {
"fields": [
{
"declarator": "xmlOverlongNames = new XmlOverlongNames()",
"modifier": "private final",
"original_string": "private final XmlOverlongNames xmlOverlongNames = new XmlOverlongNames();",
"type": "XmlOverlongNames",
"var_name": "xmlOverlongNames"
}
],
"file": "lib... | {
"body": "@Test\n public void nameTest()\n {\n assertThat( xmlOverlongNames.getName(), is( \"XmlOverlongNames\" ) );\n }",
"class_method_signature": "XmlOverlongNamesTest.nameTest()",
"constructor": false,
"full_signature": "@Test public void nameTest()",
"identifier": "nameTest",
"invocati... | {
"fields": [
{
"declarator": "MIN_NUMBER_OF_ELEMENTS = 1",
"modifier": "private static final",
"original_string": "private static final int MIN_NUMBER_OF_ELEMENTS = 1;",
"type": "int",
"var_name": "MIN_NUMBER_OF_ELEMENTS"
},
{
"declarator": "MIN_LENGTH_OF_STRING = 1",
... | {
"body": "@Override\n public String getName()\n {\n return \"XmlOverlongNames\";\n }",
"class_method_signature": "XmlOverlongNames.getName()",
"constructor": false,
"full_signature": "@Override public String getName()",
"identifier": "getName",
"invocations": [],
"modifiers": "@Override p... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_25 | {
"fields": [
{
"declarator": "m_SchemaAnalyser",
"modifier": "private static",
"original_string": "private static SchemaAnalyzer m_SchemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "m_SchemaAnalyser"
},
{
"declarator": "log",
"modifier": "private static",
... | {
"body": "@Test\n public void testSignedEncKeyWithSignedEncDataWrapping()\n throws Exception\n {\n Document doc = DomUtilities.readDocument( \"src/test/resources/schema_encKey_sig_encData_sig.xml\" );\n Document possAvoidedDoc = null;\n int max = 0;\n String attackContentData... | {
"fields": [
{
"declarator": "m_OriginalDocument",
"modifier": "private final",
"original_string": "private final Document m_OriginalDocument;",
"type": "Document",
"var_name": "m_OriginalDocument"
},
{
"declarator": "m_MaxPossibilites",
"modifier": "private",
... | {
"body": "@Override\n public int maxPossibilities()\n {\n return m_MaxPossibilites;\n }",
"class_method_signature": "EncryptionWrappingOracle.maxPossibilities()",
"constructor": false,
"full_signature": "@Override public int maxPossibilities()",
"identifier": "maxPossibilities",
"invocation... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_130 | {
"fields": [
{
"declarator": "t",
"modifier": "private static",
"original_string": "private static GenericDosPluginTest t;",
"type": "GenericDosPluginTest",
"var_name": "t"
},
{
"declarator": "attackPlugin",
"modifier": "private static",
"original_string": ... | {
"body": "@Test\n public void testCreateTamperedRequest()\n {\n t.testCreateTamperedRequest( attackPlugin );\n }",
"class_method_signature": "CoerciveParsingTest.testCreateTamperedRequest()",
"constructor": false,
"full_signature": "@Test public void testCreateTamperedRequest()",
"identifier"... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "optionNumberTags",
"modifier": "pri... | {
"body": "@Override\n public void createTamperedRequest()\n {\n\n // generate Payload\n String elementNameOpen = \"<\" + optionTag.getValue() + \">\";\n String elementNameClose = \"</\" + optionTag.getValue() + \">\";\n StringBuilder sb = new StringBuilder();\n for ( int i = ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_7 | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/library/signatureWrapping/util/signature/weakness/SignatureManipulationHelperTest.java",
"identifier": "SignatureManipulationHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveSignature_1_two_contained_prepended()\n {\n Document doc = generateDummySamlDocument( true, true, true );\n List<Element> sigList = DomUtilities.findChildren( doc.getDocumentElement(), \"Signature\", URI_NS_DS, true );\n assertEquals( 2, sigList.size... | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/main/java/wsattacker/library/signatureWrapping/util/signature/weakness/SignatureManipulationHelper.java",
"identifier": "SignatureManipulationHelper",
"interfaces": "",
"methods": [
{
"class_method_signature": "SignatureManipulationHelper.... | {
"body": "public static void removeSignature( Document msg, int which )\n {\n List<Element> signatures = DomUtilities.findChildren( msg, \"Signature\", NamespaceConstants.URI_NS_DS, true );\n Element toRemove = signatures.get( which );\n toRemove.getParentNode().removeChild( toRemove );\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_48 | {
"fields": [
{
"declarator": "xmlMessage =\n \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:axis=\\\"http://axis2.wsattacker\\\">\"\n + \" <soapenv:Header/>\" + \" <soapenv:Body>\" + \" <axis:reverser>\" + \" <!--Optional:-->\"\n... | {
"body": "@Test\n public void hasFurtherAttackTest()\n {\n assertThat( impl.hasFurtherAttack(), is( true ) );\n }",
"class_method_signature": "IntelligentDoSLibraryImplTest.hasFurtherAttackTest()",
"constructor": false,
"full_signature": "@Test public void hasFurtherAttackTest()",
"identifier... | {
"fields": [
{
"declarator": "UTR_THREADS = 4",
"modifier": "private static final",
"original_string": "private static final int UTR_THREADS = 4;",
"type": "int",
"var_name": "UTR_THREADS"
},
{
"declarator": "UTR_REQUESTS = 8",
"modifier": "private static final",... | {
"body": "@Override\n public boolean hasFurtherAttack()\n {\n return hasFurtherAttack;\n }",
"class_method_signature": "IntelligentDoSLibraryImpl.hasFurtherAttack()",
"constructor": false,
"full_signature": "@Override public boolean hasFurtherAttack()",
"identifier": "hasFurtherAttack",
"in... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_87 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryIntervalTest.java",
"identifier": "LogEntryIntervalTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetIntervalNumber()\n {\n LogEntryInterval instance = new LogEntryInterval();\n int expResult = -1;\n int result = instance.getIntervalNumber();\n assertEquals( expResult, result );\n }",
"class_method_signature": "LogEntryIntervalTest.testGetI... | {
"fields": [
{
"declarator": "intervalNumber",
"modifier": "private",
"original_string": "private int intervalNumber;",
"type": "int",
"var_name": "intervalNumber"
},
{
"declarator": "intervalLength",
"modifier": "private",
"original_string": "private int i... | {
"body": "public int getIntervalNumber()\n {\n return intervalNumber;\n }",
"class_method_signature": "LogEntryInterval.getIntervalNumber()",
"constructor": false,
"full_signature": "public int getIntervalNumber()",
"identifier": "getIntervalNumber",
"invocations": [],
"modifiers": "public",... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_68 | {
"fields": [
{
"declarator": "xmlExternalEntity = new XmlExternalEntity()",
"modifier": "private final",
"original_string": "private final XmlExternalEntity xmlExternalEntity = new XmlExternalEntity();",
"type": "XmlExternalEntity",
"var_name": "xmlExternalEntity"
}
],
"file... | {
"body": "@Test\n public void hasFurther()\n {\n assertThat( xmlExternalEntity.hasFurtherParams(), is( true ) );\n }",
"class_method_signature": "XmlExternalEntityTest.hasFurther()",
"constructor": false,
"full_signature": "@Test public void hasFurther()",
"identifier": "hasFurther",
"invoc... | {
"fields": [
{
"declarator": "XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\"",
"modifier": "private static final",
"original_string": "private static final String XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";",
"type": "String",
"var_name": "XML"
},... | {
"body": "@Override\n public boolean hasFurtherParams()\n {\n return externalEntitiesIterator.hasNext();\n }",
"class_method_signature": "XmlExternalEntity.hasFurtherParams()",
"constructor": false,
"full_signature": "@Override public boolean hasFurtherParams()",
"identifier": "hasFurtherPara... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_91 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryIntervalTest.java",
"identifier": "LogEntryIntervalTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetNumberRequests()\n {\n int numberRequests = 0;\n LogEntryInterval instance = new LogEntryInterval();\n instance.setNumberRequests( numberRequests );\n }",
"class_method_signature": "LogEntryIntervalTest.testSetNumberRequests()",
"constructor": fa... | {
"fields": [
{
"declarator": "intervalNumber",
"modifier": "private",
"original_string": "private int intervalNumber;",
"type": "int",
"var_name": "intervalNumber"
},
{
"declarator": "intervalLength",
"modifier": "private",
"original_string": "private int i... | {
"body": "public void setNumberRequests( int numberRequests )\n {\n this.numberRequests = numberRequests;\n }",
"class_method_signature": "LogEntryInterval.setNumberRequests( int numberRequests )",
"constructor": false,
"full_signature": "public void setNumberRequests( int numberRequests )",
"id... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_29 | {
"fields": [
{
"declarator": "collisionDJBX = new CollisionDJBX()",
"modifier": "",
"original_string": "CollisionDJBX collisionDJBX = new CollisionDJBX();",
"type": "CollisionDJBX",
"var_name": "collisionDJBX"
}
],
"file": "libs/Intelligent_Denial_of_Service_Library/src/test... | {
"body": "@Test\n public void hashForthTest()\n {\n assertThat( collisionDJBX.hashForth( \"0\" ), is( 48 ) );\n assertThat( collisionDJBX.hashForth( \"abc\" ), is( 807794786 ) );\n }",
"class_method_signature": "CollisionDJBXTest.hashForthTest()",
"constructor": false,
"full_signature": ... | {
"fields": [
{
"declarator": "lengthString = 10",
"modifier": "private",
"original_string": "private int lengthString = 10;",
"type": "int",
"var_name": "lengthString"
},
{
"declarator": "lengthSuffix = 4",
"modifier": "private",
"original_string": "private... | {
"body": "public int hashForth( String s )\n {\n byte[] byteArray = s.getBytes( Charset.defaultCharset() );\n int n = byteArray.length;\n int key = 0;\n for ( int i = 0; i < n; i++ )\n {\n int h = key;\n key = key << 10;\n for ( int ab = 0; ab < ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_52 | {
"fields": [],
"file": "libs/Intelligent_Denial_of_Service_Library/src/test/java/wsattacker/library/intelligentdos/ThresholdStateTest.java",
"identifier": "ThresholdStateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test()\n {\n IntelligentDoSLibraryImpl impl = Mockito.mock( IntelligentDoSLibraryImpl.class );\n AttackModel model = new AttackModel();\n when( impl.createNewTampered( false ) ).thenReturn( model );\n\n CommonParamItem min = new CommonParamItem( 1, 1, 1... | {
"fields": [
{
"declarator": "RESENDS = 1",
"modifier": "private static final",
"original_string": "private static final int RESENDS = 1;",
"type": "int",
"var_name": "RESENDS"
},
{
"declarator": "ITERATIONS = 4",
"modifier": "private static final",
"origin... | {
"body": "@Override\n public void update( IntelligentDoSLibraryImpl STATE_CONTEXT, AttackModel attackModel )\n {\n\n CommonParamItem middle;\n switch ( ths )\n {\n case PARAM:\n middle = createMiddleForParamItem( minimumParamItem, maximumParamItem );\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_110 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX31ATest.java",
"identifier": "CollisionDJBX31ATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCollisionsOk()\n {\n CollisionDJBX31A instance = new CollisionDJBX31A();\n\n int t1 = instance.getHash( \"tttt\" );\n int t2 = instance.getHash( \"ttuU\" );\n int t3 = instance.getHash( \"ttv6\" );\n int t4 = instance.getHash( \"uUtt\" );\n ... | {
"fields": [
{
"declarator": "logger = Logger.getLogger( CollisionDJBX31A.class.getName() )",
"modifier": "private final",
"original_string": "private final Logger logger = Logger.getLogger( CollisionDJBX31A.class.getName() );",
"type": "Logger",
"var_name": "logger"
}
],
"f... | {
"body": "@Override\n public int getHash( String s )\n {\n byte[] byteArray = s.getBytes();\n int n = byteArray.length;\n int hash = 0;\n for ( int i = 0; i < n; i++ )\n {\n // System.out.println(i\n // +\" out of \"+n+\" mit Byte: \"+(int)byteArray[i]+\... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_106 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "LogEntryRequest instance;",
"type": "LogEntryRequest",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryRequestTest.ja... | {
"body": "@Test\n public void testGetResponseStringCsv()\n {\n String expResult = \"test\";\n String result = instance.getResponseStringCsv();\n assertEquals( expResult, result );\n }",
"class_method_signature": "LogEntryRequestTest.testGetResponseStringCsv()",
"constructor": false,... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
"type": "String",
"var_name": "type"
},
{
"declarator": "tsSend",
"modifier": "private",
"original_string": "private long tsSend;",
"typ... | {
"body": "public String getResponseStringCsv()\n {\n return escapeForCSV( responseString );\n }",
"class_method_signature": "LogEntryRequest.getResponseStringCsv()",
"constructor": false,
"full_signature": "public String getResponseStringCsv()",
"identifier": "getResponseStringCsv",
"invocatio... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_13 | {
"fields": [
{
"declarator": "save",
"modifier": "private static",
"original_string": "private static XPathWeaknessFactoryInterface save;",
"type": "XPathWeaknessFactoryInterface",
"var_name": "save"
}
],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/libr... | {
"body": "@Test\n public void prefixFreeFastXPathTest()\n {\n XPathAnalyser a;\n String xpath;\n\n // True\n xpath =\n \"/*[local-name()='e' and namespace-uri()='ns_e'][1]/*[local-name()=\\\"h\\\" and namespace-uri()=\\\"ns_h\\\"][@id='bla']\";\n a = new XPathAnaly... | {
"fields": [
{
"declarator": "xpathWeaknessFactory = new XPathWeaknessFactory()",
"modifier": "public static",
"original_string": "public static XPathWeaknessFactoryInterface xpathWeaknessFactory = new XPathWeaknessFactory();",
"type": "XPathWeaknessFactoryInterface",
"var_name": "x... | {
"body": "public boolean isPrefixfreeTransformedFastXPath()\n {\n for ( Step step : xpath.getRelativeLocationPaths() )\n {\n if ( !step.getAxisSpecifier().getAxisName().toFullString().equals( \"child\" ) )\n {\n return false;\n }\n if ( step... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_44 | {
"fields": [
{
"declarator": "simpleSuccessDecider = new SimpleSuccessDecider()",
"modifier": "private final",
"original_string": "private final SimpleSuccessDecider simpleSuccessDecider = new SimpleSuccessDecider();",
"type": "SimpleSuccessDecider",
"var_name": "simpleSuccessDecide... | {
"body": "@Test\n public void wasSuccessfulTest()\n {\n Long[] run1 = { 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l };\n Long[] run2 = { 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l };\n\n assertThat( simpleSuccessDecider.wasSuccessful( run1, run2 ), is( Boolean.FALSE ) );\n\n run2 = new Long[... | {
"fields": [
{
"declarator": "payloadSuccessThreshold = 3",
"modifier": "private static final",
"original_string": "private static final int payloadSuccessThreshold = 3;",
"type": "int",
"var_name": "payloadSuccessThreshold"
}
],
"file": "libs/Intelligent_Denial_of_Service_L... | {
"body": "@Override\n public boolean wasSuccessful( Long[] run1, Long[] run2 )\n {\n double result = calculateRatio( run1, run2 );\n if ( result >= 0 )\n {\n double d = Math.round( result * 100.0 ) / 100.0;\n boolean successful = d > payloadSuccessThreshold;\n\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_45 | {
"fields": [
{
"declarator": "simpleSuccessDecider = new SimpleSuccessDecider()",
"modifier": "private final",
"original_string": "private final SimpleSuccessDecider simpleSuccessDecider = new SimpleSuccessDecider();",
"type": "SimpleSuccessDecider",
"var_name": "simpleSuccessDecide... | {
"body": "@Test\n public void getEfficencyTest()\n {\n Long[] run1 = { 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l };\n Long[] run2 = { 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l };\n\n assertThat( simpleSuccessDecider.getEfficency( run1, run2 ), is( Efficiency.inefficient ) );\n\n run2 = ne... | {
"fields": [
{
"declarator": "payloadSuccessThreshold = 3",
"modifier": "private static final",
"original_string": "private static final int payloadSuccessThreshold = 3;",
"type": "int",
"var_name": "payloadSuccessThreshold"
}
],
"file": "libs/Intelligent_Denial_of_Service_L... | {
"body": "@Override\n public Efficiency getEfficency( Long[] run1, Long[] run2 )\n {\n double radio = calculateRatio( run1, run2 );\n\n if ( radio < payloadSuccessThreshold )\n {\n return Efficiency.inefficient;\n }\n else if ( radio < 2 * payloadSuccessThreshold )... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_12 | {
"fields": [
{
"declarator": "save",
"modifier": "private static",
"original_string": "private static XPathWeaknessFactoryInterface save;",
"type": "XPathWeaknessFactoryInterface",
"var_name": "save"
}
],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/libr... | {
"body": "@Test\n public void fastXPathTest()\n {\n XPathAnalyser a;\n String xpath;\n\n // True\n xpath = \"/Envelope[1]/Body[1]/function[1]\";\n a = new XPathAnalyser( xpath, null, null, null );\n assertTrue( a.isFastXPath() );\n\n xpath = \"/Envelope[1]/Heade... | {
"fields": [
{
"declarator": "xpathWeaknessFactory = new XPathWeaknessFactory()",
"modifier": "public static",
"original_string": "public static XPathWeaknessFactoryInterface xpathWeaknessFactory = new XPathWeaknessFactory();",
"type": "XPathWeaknessFactoryInterface",
"var_name": "x... | {
"body": "public boolean isFastXPath()\n {\n for ( Step step : xpath.getRelativeLocationPaths() )\n {\n if ( !step.getAxisSpecifier().getAxisName().toFullString().equals( \"child\" ) )\n {\n return false;\n }\n if ( step.getAxisSpecifier().g... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_107 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "LogEntryRequest instance;",
"type": "LogEntryRequest",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryRequestTest.ja... | {
"body": "@Test\n public void testSetResponseString()\n {\n String responseString = \"test\";\n instance.setResponseString( responseString );\n }",
"class_method_signature": "LogEntryRequestTest.testSetResponseString()",
"constructor": false,
"full_signature": "@Test public void testSetR... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
"type": "String",
"var_name": "type"
},
{
"declarator": "tsSend",
"modifier": "private",
"original_string": "private long tsSend;",
"typ... | {
"body": "public void setResponseString( String responseString )\n {\n this.responseString = responseString;\n }",
"class_method_signature": "LogEntryRequest.setResponseString( String responseString )",
"constructor": false,
"full_signature": "public void setResponseString( String responseString )... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_111 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX31ATest.java",
"identifier": "CollisionDJBX31ATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGenNCollisions()\n {\n int numberAttributes = 32;\n StringBuilder sb = new StringBuilder();\n CollisionDJBX31A instance = new CollisionDJBX31A();\n instance.genNCollisions( numberAttributes, sb, false );\n\n // We got here so no everthing OK\... | {
"fields": [
{
"declarator": "logger = Logger.getLogger( CollisionDJBX31A.class.getName() )",
"modifier": "private final",
"original_string": "private final Logger logger = Logger.getLogger( CollisionDJBX31A.class.getName() );",
"type": "Logger",
"var_name": "logger"
}
],
"f... | {
"body": "@Override\n public void genNCollisions( int numberAttributes, StringBuilder sb, boolean useNamespace )\n {\n\n try\n {\n final long startTime = System.nanoTime();\n final long endTime;\n String prefix = \"\";\n\n // calculate Exponent so that ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_53 | {
"fields": [
{
"declarator": "attackModel = new AttackModel()",
"modifier": "private final",
"original_string": "private final AttackModel attackModel = new AttackModel();",
"type": "AttackModel",
"var_name": "attackModel"
}
],
"file": "libs/Intelligent_Denial_of_Service_Lib... | {
"body": "@Test\n public void toStringTest()\n {\n\n DoSAttack doSAttack = mock( DoSAttack.class );\n when( doSAttack.getName() ).thenReturn( \"lorem\" );\n attackModel.setDoSAttack( doSAttack );\n\n Position position = mock( Position.class );\n when( position.toString() ).th... | {
"fields": [
{
"declarator": "RATE_SUCCESSFUL_FAILED = 0.7",
"modifier": "private static final",
"original_string": "private static final double RATE_SUCCESSFUL_FAILED = 0.7;",
"type": "double",
"var_name": "RATE_SUCCESSFUL_FAILED"
},
{
"declarator": "current",
"... | {
"body": "@Override\n public String toString()\n {\n return String.format( \"AttackModel[a=%s, e=%s, p=%s]\", doSAttack.getName(), position, payloadPosition );\n }",
"class_method_signature": "AttackModel.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_28 | {
"fields": [
{
"declarator": "collisionDJBX = new CollisionDJBX()",
"modifier": "",
"original_string": "CollisionDJBX collisionDJBX = new CollisionDJBX();",
"type": "CollisionDJBX",
"var_name": "collisionDJBX"
}
],
"file": "libs/Intelligent_Denial_of_Service_Library/src/test... | {
"body": "@Test\n public void complexTest()\n {\n assertThat( collisionDJBX.getHash( \"2PV0\" ), is( 1073754255 ) );\n assertThat( collisionDJBX.getHash( \"test\" ), is( 1233125307 ) );\n assertThat( collisionDJBX.getHash( \"waddehaddedudeda\" ), is( -671098362 ) );\n }",
"class_metho... | {
"fields": [
{
"declarator": "lengthString = 10",
"modifier": "private",
"original_string": "private int lengthString = 10;",
"type": "int",
"var_name": "lengthString"
},
{
"declarator": "lengthSuffix = 4",
"modifier": "private",
"original_string": "private... | {
"body": "@Override\n public int getHash( String s )\n {\n\n // http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/9645\n // register long len = RSTRING(str)->len;\n // register char *p = RSTRING(str)->ptr;\n // register int key = 0;\n // if (ruby_ignorecase) {\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_90 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryIntervalTest.java",
"identifier": "LogEntryIntervalTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIncNumberRequests()\n {\n LogEntryInterval instance = new LogEntryInterval();\n int expResult = instance.getNumberRequests() + 1;\n instance.incNumberRequests();\n int result = instance.getNumberRequests();\n assertEquals( expResult, result )... | {
"fields": [
{
"declarator": "intervalNumber",
"modifier": "private",
"original_string": "private int intervalNumber;",
"type": "int",
"var_name": "intervalNumber"
},
{
"declarator": "intervalLength",
"modifier": "private",
"original_string": "private int i... | {
"body": "public void incNumberRequests()\n {\n numberRequests++;\n }",
"class_method_signature": "LogEntryInterval.incNumberRequests()",
"constructor": false,
"full_signature": "public void incNumberRequests()",
"identifier": "incNumberRequests",
"invocations": [],
"modifiers": "public",
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_86 | {
"fields": [
{
"declarator": "t",
"modifier": "private static",
"original_string": "private static GenericDosPluginTest t;",
"type": "GenericDosPluginTest",
"var_name": "t"
},
{
"declarator": "attackPlugin",
"modifier": "private static",
"original_string": ... | {
"body": "@Test\n public void testCreateTamperedRequest()\n {\n t.testCreateTamperedRequest( attackPlugin );\n }",
"class_method_signature": "XmlElementCountTest.testCreateTamperedRequest()",
"constructor": false,
"full_signature": "@Test public void testCreateTamperedRequest()",
"identifier"... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "numberOfElements",
"modifier": "pri... | {
"body": "@Override\n public void createTamperedRequest()\n {\n\n String soapMessage = this.getOptionTextAreaSoapMessage().getValue();\n String soapMessageFinal = \"\";\n\n // create Payload\n StringBuilder sb = new StringBuilder( \"\" );\n for ( int i = 1; i < ( numberOfElem... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_69 | {
"fields": [
{
"declarator": "xmlAttributeCount = new XmlAttributeCount()",
"modifier": "private final",
"original_string": "private final XmlAttributeCount xmlAttributeCount = new XmlAttributeCount();",
"type": "XmlAttributeCount",
"var_name": "xmlAttributeCount"
}
],
"file... | {
"body": "@Test\n public void nameTest()\n {\n assertThat( xmlAttributeCount.getName(), is( \"XmlAttributeCount\" ) );\n }",
"class_method_signature": "XmlAttributeCountTest.nameTest()",
"constructor": false,
"full_signature": "@Test public void nameTest()",
"identifier": "nameTest",
"invoc... | {
"fields": [
{
"declarator": "MIN_NUMBER_OF_ATTRIBUTES = 2",
"modifier": "private static final",
"original_string": "private static final int MIN_NUMBER_OF_ATTRIBUTES = 2;",
"type": "int",
"var_name": "MIN_NUMBER_OF_ATTRIBUTES"
},
{
"declarator": "possiblePossitions = ... | {
"body": "@Override\n public String getName()\n {\n return \"XmlAttributeCount\";\n }",
"class_method_signature": "XmlAttributeCount.getName()",
"constructor": false,
"full_signature": "@Override public String getName()",
"identifier": "getName",
"invocations": [],
"modifiers": "@Override... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_6 | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/library/signatureWrapping/util/signature/weakness/SignatureManipulationHelperTest.java",
"identifier": "SignatureManipulationHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveSignature_0_two_contained_prepended()\n {\n Document doc = generateDummySamlDocument( true, true, true );\n List<Element> sigList = DomUtilities.findChildren( doc.getDocumentElement(), \"Signature\", URI_NS_DS, true );\n assertEquals( 2, sigList.size... | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/main/java/wsattacker/library/signatureWrapping/util/signature/weakness/SignatureManipulationHelper.java",
"identifier": "SignatureManipulationHelper",
"interfaces": "",
"methods": [
{
"class_method_signature": "SignatureManipulationHelper.... | {
"body": "public static void removeSignature( Document msg, int which )\n {\n List<Element> signatures = DomUtilities.findChildren( msg, \"Signature\", NamespaceConstants.URI_NS_DS, true );\n Element toRemove = signatures.get( which );\n toRemove.getParentNode().removeChild( toRemove );\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_49 | {
"fields": [
{
"declarator": "xmlMessage =\n \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:axis=\\\"http://axis2.wsattacker\\\">\"\n + \" <soapenv:Header/>\" + \" <soapenv:Body>\" + \" <axis:reverser>\" + \" <!--Optional:-->\"\n... | {
"body": "@Test\n public void hasNoFurtherAttacks()\n {\n String xmlMessage2 = \"<?xml version=\\\"1.0\\\"?><Envelope><Header></Header><Body></Body></Envelope>\";\n PositionIterator positionIterator = new SchemaAnalyzerPositionIterator( schemaAnalyzer, xmlMessage2 );\n\n IntelligentDoSLibr... | {
"fields": [
{
"declarator": "UTR_THREADS = 4",
"modifier": "private static final",
"original_string": "private static final int UTR_THREADS = 4;",
"type": "int",
"var_name": "UTR_THREADS"
},
{
"declarator": "UTR_REQUESTS = 8",
"modifier": "private static final",... | {
"body": "@Override\n public boolean hasFurtherAttack()\n {\n return hasFurtherAttack;\n }",
"class_method_signature": "IntelligentDoSLibraryImpl.hasFurtherAttack()",
"constructor": false,
"full_signature": "@Override public boolean hasFurtherAttack()",
"identifier": "hasFurtherAttack",
"in... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_131 | {
"fields": [
{
"declarator": "t",
"modifier": "private static",
"original_string": "private static GenericDosPluginTest t;",
"type": "GenericDosPluginTest",
"var_name": "t"
},
{
"declarator": "attackPlugin",
"modifier": "private static",
"original_string": ... | {
"body": "@Test\n public void testCreateTamperedRequest()\n {\n t.testCreateTamperedRequest( attackPlugin );\n }",
"class_method_signature": "XmlEntityExpansionTest.testCreateTamperedRequest()",
"constructor": false,
"full_signature": "@Test public void testCreateTamperedRequest()",
"identifi... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "optionExponent",
"modifier": "priva... | {
"body": "@Override\n public void createTamperedRequest()\n {\n\n // get Message\n String soapMessageFinal;\n String soapMessage = this.getOptionTextAreaSoapMessage().getValue();\n\n // inset payload entity in envelope\n // String attribute = \"entityAttack=\\\"&x1;\\\"\";\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_24 | {
"fields": [
{
"declarator": "m_SigManager",
"modifier": "private",
"original_string": "private SignatureManager m_SigManager;",
"type": "SignatureManager",
"var_name": "m_SigManager"
},
{
"declarator": "m_PipeLine",
"modifier": "private",
"original_string"... | {
"body": "@Test\n public void testEncDataSignedWithoutId()\n throws FileNotFoundException, XPathExpressionException, SAXException, IOException, InvalidPayloadException,\n InvalidWeaknessException\n {\n Document doc = DomUtilities.readDocument( \"src/test/resources/case_encData_signed_no_id... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger( EncryptionAttributeIdWeakness.class )",
"modifier": "private final static",
"original_string": "private final static Logger LOG = Logger.getLogger( EncryptionAttributeIdWeakness.class );",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public int getPossibleNumWeaks()\n {\n return m_PossibleWeaks;\n }",
"class_method_signature": "EncryptionAttributeIdWeakness.getPossibleNumWeaks()",
"constructor": false,
"full_signature": "@Override public int getPossibleNumWeaks()",
"identifier": "getPossibleNumWeaks"... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_73 | {
"fields": [
{
"declarator": "xmlOverlongNames = new XmlOverlongNames()",
"modifier": "private final",
"original_string": "private final XmlOverlongNames xmlOverlongNames = new XmlOverlongNames();",
"type": "XmlOverlongNames",
"var_name": "xmlOverlongNames"
}
],
"file": "lib... | {
"body": "@Test\n public void hasFurther()\n {\n assertThat( xmlOverlongNames.hasFurtherParams(), is( true ) );\n }",
"class_method_signature": "XmlOverlongNamesTest.hasFurther()",
"constructor": false,
"full_signature": "@Test public void hasFurther()",
"identifier": "hasFurther",
"invocat... | {
"fields": [
{
"declarator": "MIN_NUMBER_OF_ELEMENTS = 1",
"modifier": "private static final",
"original_string": "private static final int MIN_NUMBER_OF_ELEMENTS = 1;",
"type": "int",
"var_name": "MIN_NUMBER_OF_ELEMENTS"
},
{
"declarator": "MIN_LENGTH_OF_STRING = 1",
... | {
"body": "@Override\n public boolean hasFurtherParams()\n {\n return lengthOfStrings.hasNext() || numberOfElements.hasNext() || overlongForIterator.hasNext();\n }",
"class_method_signature": "XmlOverlongNames.hasFurtherParams()",
"constructor": false,
"full_signature": "@Override public boolean... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_65 | {
"fields": [
{
"declarator": "coerciveParsing = new CoerciveParsing()",
"modifier": "private final",
"original_string": "private final CoerciveParsing coerciveParsing = new CoerciveParsing();",
"type": "CoerciveParsing",
"var_name": "coerciveParsing"
}
],
"file": "libs/Intel... | {
"body": "@Test\n public void compareToTest()\n {\n coerciveParsing.nextParam();\n\n assertThat( coerciveParsing.compareTo( coerciveParsing ), is( 0 ) );\n\n // different classes\n assertThat( coerciveParsing.compareTo( new HashCollision() ), is( 0 ) );\n\n CoerciveParsing cp... | {
"fields": [
{
"declarator": "possiblePossitions = { PayloadPosition.ELEMENT }",
"modifier": "private final",
"original_string": "private final PayloadPosition[] possiblePossitions = { PayloadPosition.ELEMENT };",
"type": "PayloadPosition[]",
"var_name": "possiblePossitions"
},
... | {
"body": "@Override\n public int compareTo( DoSAttack aThat )\n {\n // this optimization is usually worthwhile, and can\n // always be added\n if ( this == aThat )\n return EQUAL;\n\n if ( !aThat.getClass().equals( getClass() ) )\n {\n return EQUAL;\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_127 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/clock/TickerThreadTest.java",
"identifier": "TickerThreadTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRun()\n {\n AttackModel model = new AttackModel();\n TickerThread instance = new TickerThread( model );\n assertNotNull( \"New Clock Thread should be created and running\", instance );\n instance.interrupt();\n // TODO review the generated te... | {
"fields": [
{
"declarator": "UPDATE_INTERVAL = 1000",
"modifier": "private final static",
"original_string": "private final static int UPDATE_INTERVAL = 1000;",
"type": "int",
"var_name": "UPDATE_INTERVAL"
},
{
"declarator": "update",
"modifier": "private",
... | {
"body": "@Override\n public void run()\n {\n try\n {\n while ( !isInterrupted() )\n {\n // Warum kann ich nicht hier direkt ModelMethode aufrufen und so\n // GUI-Update provozieren?\n // -> einfach BadPractice?! kann zu Problemen... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_32 | {
"fields": [
{
"declarator": "successfulState = new SuccessfulState()",
"modifier": "private final",
"original_string": "private final SuccessfulState successfulState = new SuccessfulState();",
"type": "SuccessfulState",
"var_name": "successfulState"
}
],
"file": "libs/Intel... | {
"body": "@Test\n public void testFirstResponse()\n {\n IntelligentDoSLibraryImpl context = Mockito.mock( IntelligentDoSLibraryImpl.class );\n SuccessDecider sd = mock( SuccessDecider.class );\n when( context.getSuccessDecider() ).thenReturn( sd );\n when( sd.calculateRatio( null, n... | {
"fields": [
{
"declarator": "logger = Logger.getLogger( getClass() )",
"modifier": "private final",
"original_string": "private final Logger logger = Logger.getLogger( getClass() );",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "untampered",
"modif... | {
"body": "@Override\n public void update( final IntelligentDoSLibraryImpl STATE_CONTEXT, final AttackModel attackModel )\n {\n\n SuccessDecider successDecider = STATE_CONTEXT.getSuccessDecider();\n\n if ( untampered == null )\n {\n untampered = attackModel;\n\n // che... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_5 | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/library/signatureWrapping/util/signature/weakness/SignatureManipulationHelperTest.java",
"identifier": "SignatureManipulationHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveSignature_1_two_contained()\n {\n Document doc = generateDummySamlDocument( true, true, false );\n List<Element> sigList = DomUtilities.findChildren( doc.getDocumentElement(), \"Signature\", URI_NS_DS, true );\n assertEquals( 2, sigList.size() );\n\n... | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/main/java/wsattacker/library/signatureWrapping/util/signature/weakness/SignatureManipulationHelper.java",
"identifier": "SignatureManipulationHelper",
"interfaces": "",
"methods": [
{
"class_method_signature": "SignatureManipulationHelper.... | {
"body": "public static void removeSignature( Document msg, int which )\n {\n List<Element> signatures = DomUtilities.findChildren( msg, \"Signature\", NamespaceConstants.URI_NS_DS, true );\n Element toRemove = signatures.get( which );\n toRemove.getParentNode().removeChild( toRemove );\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_108 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX31ATest.java",
"identifier": "CollisionDJBX31ATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetHash()\n {\n String s = \"EzFY\";\n CollisionDJBX31A instance = new CollisionDJBX31A();\n int expResult = 2175080;\n int result = instance.getHash( s );\n assertEquals( expResult, result );\n }",
"class_method_signature": "CollisionDJ... | {
"fields": [
{
"declarator": "logger = Logger.getLogger( CollisionDJBX31A.class.getName() )",
"modifier": "private final",
"original_string": "private final Logger logger = Logger.getLogger( CollisionDJBX31A.class.getName() );",
"type": "Logger",
"var_name": "logger"
}
],
"f... | {
"body": "@Override\n public int getHash( String s )\n {\n byte[] byteArray = s.getBytes();\n int n = byteArray.length;\n int hash = 0;\n for ( int i = 0; i < n; i++ )\n {\n // System.out.println(i\n // +\" out of \"+n+\" mit Byte: \"+(int)byteArray[i]+\... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_132 | {
"fields": [
{
"declarator": "t",
"modifier": "private static",
"original_string": "private static GenericDosPluginTest t;",
"type": "GenericDosPluginTest",
"var_name": "t"
},
{
"declarator": "attackPlugin",
"modifier": "private static",
"original_string": ... | {
"body": "@Test\n public void testCreateTamperedRequest()\n {\n t.testCreateTamperedRequest( attackPlugin );\n }",
"class_method_signature": "XmlExternalEntityTest.testCreateTamperedRequest()",
"constructor": false,
"full_signature": "@Test public void testCreateTamperedRequest()",
"identifie... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "optionExternalEntity",
"modifier": ... | {
"body": "@Override\n public void createTamperedRequest()\n {\n\n // get Message\n String soapMessageFinal;\n String soapMessage = this.getOptionTextAreaSoapMessage().getValue();\n\n // inset payload entity in envelope\n String attribute = \"&attackEntity;\";\n soapMes... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_27 | {
"fields": [
{
"declarator": "collisionDJBX = new CollisionDJBX()",
"modifier": "",
"original_string": "CollisionDJBX collisionDJBX = new CollisionDJBX();",
"type": "CollisionDJBX",
"var_name": "collisionDJBX"
}
],
"file": "libs/Intelligent_Denial_of_Service_Library/src/test... | {
"body": "@Test\n public void test()\n {\n assertThat( collisionDJBX.getHash( \"0\" ), is( 49 ) );\n assertThat( collisionDJBX.getHash( \"9\" ), is( 58 ) );\n assertThat( collisionDJBX.getHash( \"A\" ), is( 67 ) );\n assertThat( collisionDJBX.getHash( \"Z\" ), is( 92 ) );\n a... | {
"fields": [
{
"declarator": "lengthString = 10",
"modifier": "private",
"original_string": "private int lengthString = 10;",
"type": "int",
"var_name": "lengthString"
},
{
"declarator": "lengthSuffix = 4",
"modifier": "private",
"original_string": "private... | {
"body": "@Override\n public int getHash( String s )\n {\n\n // http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/9645\n // register long len = RSTRING(str)->len;\n // register char *p = RSTRING(str)->ptr;\n // register int key = 0;\n // if (ruby_ignorecase) {\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_70 | {
"fields": [
{
"declarator": "xmlAttributeCount = new XmlAttributeCount()",
"modifier": "private final",
"original_string": "private final XmlAttributeCount xmlAttributeCount = new XmlAttributeCount();",
"type": "XmlAttributeCount",
"var_name": "xmlAttributeCount"
}
],
"file... | {
"body": "@Test\n public void hasFurther()\n {\n assertThat( xmlAttributeCount.hasFurtherParams(), is( true ) );\n }",
"class_method_signature": "XmlAttributeCountTest.hasFurther()",
"constructor": false,
"full_signature": "@Test public void hasFurther()",
"identifier": "hasFurther",
"invoc... | {
"fields": [
{
"declarator": "MIN_NUMBER_OF_ATTRIBUTES = 2",
"modifier": "private static final",
"original_string": "private static final int MIN_NUMBER_OF_ATTRIBUTES = 2;",
"type": "int",
"var_name": "MIN_NUMBER_OF_ATTRIBUTES"
},
{
"declarator": "possiblePossitions = ... | {
"body": "@Override\n public boolean hasFurtherParams()\n {\n return numberOfAttributes.hasNext() || namesIterator.hasNext();\n }",
"class_method_signature": "XmlAttributeCount.hasFurtherParams()",
"constructor": false,
"full_signature": "@Override public boolean hasFurtherParams()",
"identif... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_66 | {
"fields": [
{
"declarator": "hashCollision = new HashCollision()",
"modifier": "private final",
"original_string": "private final HashCollision hashCollision = new HashCollision();",
"type": "HashCollision",
"var_name": "hashCollision"
}
],
"file": "libs/Intelligent_Denial_... | {
"body": "@Test\n public void hasFurther()\n {\n assertThat( hashCollision.hasFurtherParams(), is( true ) );\n }",
"class_method_signature": "HashCollisionTest.hasFurther()",
"constructor": false,
"full_signature": "@Test public void hasFurther()",
"identifier": "hasFurther",
"invocations":... | {
"fields": [
{
"declarator": "MIN_NUMBER_OF_COLLISIONS = 2",
"modifier": "private static final",
"original_string": "private static final int MIN_NUMBER_OF_COLLISIONS = 2;",
"type": "int",
"var_name": "MIN_NUMBER_OF_COLLISIONS"
},
{
"declarator": "possiblePossitions = ... | {
"body": "@Override\n public boolean hasFurtherParams()\n {\n return numberOfCollisions.hasNext() || useNamespaceIterator.hasNext() || collisionIterator.hasNext();\n }",
"class_method_signature": "HashCollision.hasFurtherParams()",
"constructor": false,
"full_signature": "@Override public boole... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_89 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryIntervalTest.java",
"identifier": "LogEntryIntervalTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetNumberRequests()\n {\n LogEntryInterval instance = new LogEntryInterval();\n int expResult = 0;\n int result = instance.getNumberRequests();\n assertEquals( expResult, result );\n }",
"class_method_signature": "LogEntryIntervalTest.testGetNu... | {
"fields": [
{
"declarator": "intervalNumber",
"modifier": "private",
"original_string": "private int intervalNumber;",
"type": "int",
"var_name": "intervalNumber"
},
{
"declarator": "intervalLength",
"modifier": "private",
"original_string": "private int i... | {
"body": "public int getNumberRequests()\n {\n return numberRequests;\n }",
"class_method_signature": "LogEntryInterval.getNumberRequests()",
"constructor": false,
"full_signature": "public int getNumberRequests()",
"identifier": "getNumberRequests",
"invocations": [],
"modifiers": "public",... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_124 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/clock/UpdateClockRunnableTest.java",
"identifier": "UpdateClockRunnableTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRun()\n {\n assertTrue( \"Not yet implemented\", true );\n }",
"class_method_signature": "UpdateClockRunnableTest.testRun()",
"constructor": false,
"full_signature": "@Test public void testRun()",
"identifier": "testRun",
"invocations": [
"assertTrue"
... | {
"fields": [
{
"declarator": "model",
"modifier": "private",
"original_string": "private AttackModel model;",
"type": "AttackModel",
"var_name": "model"
},
{
"declarator": "clock",
"modifier": "private",
"original_string": "private Clock clock;",
"typ... | {
"body": "@Override\n public void run()\n {\n // WIR UPDATEN DAS MODELL!\n // call method that updates label of Clock!\n // trigger actionListener\n String currentTime = clock.update();\n model.updateClock( currentTime );\n }",
"class_method_signature": "UpdateClockRunna... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_31 | {
"fields": [
{
"declarator": "collisionDJBX = new CollisionDJBX()",
"modifier": "",
"original_string": "CollisionDJBX collisionDJBX = new CollisionDJBX();",
"type": "CollisionDJBX",
"var_name": "collisionDJBX"
}
],
"file": "libs/Intelligent_Denial_of_Service_Library/src/test... | {
"body": "@Test\n public void genNCollisionsTest()\n {\n StringBuilder sb = new StringBuilder();\n collisionDJBX.genNCollisions( 2, sb, false );\n assertThat( sb.toString(), is( \"qqSD2u3H1h=\\\"qqSD2u3H1h\\\" DhOXtEllgi=\\\"DhOXtEllgi\\\" \" ) );\n\n sb = new StringBuilder();\n ... | {
"fields": [
{
"declarator": "lengthString = 10",
"modifier": "private",
"original_string": "private int lengthString = 10;",
"type": "int",
"var_name": "lengthString"
},
{
"declarator": "lengthSuffix = 4",
"modifier": "private",
"original_string": "private... | {
"body": "@Override\n public void genNCollisions( int numberAttributes, StringBuilder sb, boolean useNamespace )\n {\n\n Scanner scanner = null;\n try\n {\n InputStream is = CollisionDJBX.class.getResourceAsStream( \"/RubyCollisions/RubyCollisions.txt\" );\n scanner =... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_46 | {
"fields": [
{
"declarator": "xmlMessage =\n \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:axis=\\\"http://axis2.wsattacker\\\">\"\n + \" <soapenv:Header/>\" + \" <soapenv:Body>\" + \" <axis:reverser>\" + \" <!--Optional:-->\"\n... | {
"body": "@Test\n public void testprobes()\n {\n String content = impl.getTestProbeContent();\n assertThat( content, is( xmlMessage ) );\n }",
"class_method_signature": "IntelligentDoSLibraryImplTest.testprobes()",
"constructor": false,
"full_signature": "@Test public void testprobes()",... | {
"fields": [
{
"declarator": "UTR_THREADS = 4",
"modifier": "private static final",
"original_string": "private static final int UTR_THREADS = 4;",
"type": "int",
"var_name": "UTR_THREADS"
},
{
"declarator": "UTR_REQUESTS = 8",
"modifier": "private static final",... | {
"body": "@Override\n public String getTestProbeContent()\n {\n return xmlMessage;\n }",
"class_method_signature": "IntelligentDoSLibraryImpl.getTestProbeContent()",
"constructor": false,
"full_signature": "@Override public String getTestProbeContent()",
"identifier": "getTestProbeContent",
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_9 | {
"fields": [
{
"declarator": "log = Logger.getLogger( XPathDescendantWeaknessTest.class )",
"modifier": "private static",
"original_string": "private static Logger log = Logger.getLogger( XPathDescendantWeaknessTest.class );",
"type": "Logger",
"var_name": "log"
}
],
"file":... | {
"body": "@Test\n public void withPreXPath()\n throws Exception\n {\n Document doc = DomUtilities.readDocument( \"src/test/resources/signed_rampart_message_soap_1.2.xml\" );\n SchemaAnalyzer sa = SchemaAnalyzerFactory.getInstance( SchemaAnalyzerFactory.NULL );\n SignatureManager sm ... | {
"fields": [
{
"declarator": "LOG = Logger.getLogger( XPathDescendantWeakness.class )",
"modifier": "private final static",
"original_string": "private final static Logger LOG = Logger.getLogger( XPathDescendantWeakness.class );",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public int getNumberOfPossibilities()\n {\n return numberOfPostProcessPossibilites > 0 ? numberOfPossibilites * numberOfPostProcessPossibilites\n : numberOfPossibilites;\n }",
"class_method_signature": "XPathDescendantWeakness.getNumberOfPossibilities()"... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_11 | {
"fields": [
{
"declarator": "schemaAnalyser",
"modifier": "public static",
"original_string": "public static SchemaAnalyzer schemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "schemaAnalyser"
},
{
"declarator": "log",
"modifier": "public static",
"ori... | {
"body": "@Test\n public void samlSameIdTest()\n throws Exception\n {\n log.info( \"### Reading SAML message\" );\n SignatureManager manager = new SignatureManager();\n Document doc = DomUtilities.readDocument( \"src/test/resources/saml_same_id.xml\" );\n manager.setDocument(... | {
"fields": [
{
"declarator": "schemaAnalyser",
"modifier": "private final",
"original_string": "private final SchemaAnalyzer schemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "schemaAnalyser"
},
{
"declarator": "originalDocument",
"modifier": "private final... | {
"body": "public int maxPossibilities()\n {\n return maxPossibilites;\n }",
"class_method_signature": "WrappingOracle.maxPossibilities()",
"constructor": false,
"full_signature": "public int maxPossibilities()",
"identifier": "maxPossibilities",
"invocations": [],
"modifiers": "public",
"p... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_104 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "LogEntryRequest instance;",
"type": "LogEntryRequest",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryRequestTest.ja... | {
"body": "@Test\n public void testSetFaultFlag()\n {\n boolean faultFlag = false;\n instance.setFaultFlag( faultFlag );\n }",
"class_method_signature": "LogEntryRequestTest.testSetFaultFlag()",
"constructor": false,
"full_signature": "@Test public void testSetFaultFlag()",
"identifier"... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
"type": "String",
"var_name": "type"
},
{
"declarator": "tsSend",
"modifier": "private",
"original_string": "private long tsSend;",
"typ... | {
"body": "public void setFaultFlag( boolean faultFlag )\n {\n this.faultFlag = faultFlag;\n }",
"class_method_signature": "LogEntryRequest.setFaultFlag( boolean faultFlag )",
"constructor": false,
"full_signature": "public void setFaultFlag( boolean faultFlag )",
"identifier": "setFaultFlag",
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_112 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX31ATest.java",
"identifier": "CollisionDJBX31ATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetCollisionString()\n {\n int i = 9 - 1;\n int n = 2;\n CollisionDJBX31A instance = new CollisionDJBX31A();\n String expResult = \"v6v6\";\n String result = instance.getCollisionString( i, n );\n assertEquals( expResult, result );\n ... | {
"fields": [
{
"declarator": "logger = Logger.getLogger( CollisionDJBX31A.class.getName() )",
"modifier": "private final",
"original_string": "private final Logger logger = Logger.getLogger( CollisionDJBX31A.class.getName() );",
"type": "Logger",
"var_name": "logger"
}
],
"f... | {
"body": "@Override\n public String getCollisionString( int i, int n )\n {\n // init Bytes with collision Strings\n byte[] StringCollision0 = { 't', 't' };\n byte[] StringCollision1 = { 'u', 'U' };\n byte[] StringCollision2 = { 'v', '6' };\n\n // init empty ByteArray of corre... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_50 | {
"fields": [
{
"declarator": "xmlMessage =\n \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:axis=\\\"http://axis2.wsattacker\\\">\"\n + \" <soapenv:Header/>\" + \" <soapenv:Body>\" + \" <axis:reverser>\" + \" <!--Optional:-->\"\n... | {
"body": "@Test\n public void untamperedAttackContent()\n {\n AttackModel attack = impl.nextAttack();\n assertThat( attack.getRequestType(), is( RequestType.UNTAMPERED ) );\n\n String content = attack.getRequestContent();\n assertThat( content, containsString( \"<!-- ccccccccccccccc... | {
"fields": [
{
"declarator": "UTR_THREADS = 4",
"modifier": "private static final",
"original_string": "private static final int UTR_THREADS = 4;",
"type": "int",
"var_name": "UTR_THREADS"
},
{
"declarator": "UTR_REQUESTS = 8",
"modifier": "private static final",... | {
"body": "@Override\n public synchronized AttackModel nextAttack()\n {\n // set hasFurtherAttack to false because we cannot create a new attack\n // as long as we didn't update the measures\n hasFurtherAttack = false;\n\n return currentAttack;\n }",
"class_method_signature": "I... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_93 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryIntervalTest.java",
"identifier": "LogEntryIntervalTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetMeanResponseTime()\n {\n float meanResponseTime = 0.0F;\n LogEntryInterval instance = new LogEntryInterval();\n instance.setMeanResponseTime( meanResponseTime );\n }",
"class_method_signature": "LogEntryIntervalTest.testSetMeanResponseTime()",
"c... | {
"fields": [
{
"declarator": "intervalNumber",
"modifier": "private",
"original_string": "private int intervalNumber;",
"type": "int",
"var_name": "intervalNumber"
},
{
"declarator": "intervalLength",
"modifier": "private",
"original_string": "private int i... | {
"body": "public void setMeanResponseTime( float meanResponseTime )\n {\n this.meanResponseTime = meanResponseTime;\n }",
"class_method_signature": "LogEntryInterval.setMeanResponseTime( float meanResponseTime )",
"constructor": false,
"full_signature": "public void setMeanResponseTime( float mean... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_85 | {
"fields": [],
"file": "framework/src/test/java/wsattacker/gui/component/pluginconfiguration/option/OptionChoiceGUI_NBTest.java",
"identifier": "OptionChoiceGUI_NBTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBindingDoUnbind()\n {\n OptionSimpleChoice choice = new OptionSimpleChoice( \"Test Option\", \"Test Name\" );\n OptionChoiceGUI_NB gui = new OptionChoiceGUI_NB( choice );\n gui.bindingDoUnbind();\n }",
"class_method_signature": "OptionChoiceGUI_NBTest... | {
"fields": [
{
"declarator": "FALLBACKCHOICES = Arrays.asList( \"Currently no Data\" )",
"modifier": "final private",
"original_string": "final private List<String> FALLBACKCHOICES = Arrays.asList( \"Currently no Data\" );",
"type": "List<String>",
"var_name": "FALLBACKCHOICES"
... | {
"body": "@Override\n public void bindingDoUnbind()\n {\n // The following command will throw an exception\n // bindingGroup.unbind();\n List<Binding> bindingList = bindingGroup.getBindings();\n for ( int i = bindingList.size() - 1; i >= 0; --i )\n {\n bindingList.... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_128 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/chart/ChartObjectTest.java",
"identifier": "ChartObjectTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCreateOverlaidChart()\n {\n AttackModel model = new AttackModel();\n ChartObject chartObject = new ChartObject( model );\n JFreeChart chart = chartObject.createOverlaidChart();\n\n assertNotNull( \"Should contain chart object\", chart );\n }",
... | {
"fields": [
{
"declarator": "model",
"modifier": "",
"original_string": "AttackModel model;",
"type": "AttackModel",
"var_name": "model"
}
],
"file": "plugins/Denial_of_Service/src/main/java/wsattacker/plugin/dos/dosExtension/chart/ChartObject.java",
"identifier": "ChartO... | {
"body": "public JFreeChart createOverlaidChart()\n {\n\n // ----------------------------\n // Data and X-Y-Axis - Response Time Testprobes\n // - Y-Achse 0\n final DateAxis yAxis = new DateAxis( \"Time\" );\n yAxis.setTickMarkPosition( DateTickMarkPosition.MIDDLE );\n //... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_129 | {
"fields": [
{
"declarator": "t",
"modifier": "private static",
"original_string": "private static GenericDosPluginTest t;",
"type": "GenericDosPluginTest",
"var_name": "t"
},
{
"declarator": "attackPlugin",
"modifier": "private static",
"original_string": ... | {
"body": "@Test\n public void testCreateTamperedRequest()\n {\n t.testCreateTamperedRequest( attackPlugin );\n }",
"class_method_signature": "CompressionTest.testCreateTamperedRequest()",
"constructor": false,
"full_signature": "@Test public void testCreateTamperedRequest()",
"identifier": "t... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "usedPayloadChar",
"modifier": "priv... | {
"body": "@Override\n public void createTamperedRequest()\n {\n\n StringBuilder sb = new StringBuilder( \"\" );\n\n // replace \"Payload-Attribute\" with Payload-String\n String soapMessage = this.getOptionTextAreaSoapMessage().getValue();\n String[] soapMessageParts = soapMessage.s... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_84 | {
"fields": [],
"file": "framework/src/test/java/wsattacker/main/composition/plugin/TestAbstractPlugin.java",
"identifier": "TestAbstractPlugin",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEquals()\n {\n AbstractPlugin a1 = new NullPlugin( \"a\" );\n AbstractPlugin a2 = new NullPlugin( \"a\" );\n AbstractPlugin b = new NullPlugin( \"b\" );\n\n assertTrue( a1.equals( a1 ) );\n assertTrue( a2.equals( a2 ) );\n assertTrue( ... | {
"fields": [
{
"declarator": "serialVersionUID = 3L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 3L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "PROP_NAME = \"name\"",
"modifier": ... | {
"body": "@Override\n public boolean equals( final Object o )\n {\n boolean result = false;\n if ( o instanceof AbstractPlugin )\n {\n result = ( (AbstractPlugin) o ).getName().equals( this.getName() );\n }\n return result;\n }",
"class_method_signature": "Abs... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_92 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryIntervalTest.java",
"identifier": "LogEntryIntervalTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMeanResponseTime()\n {\n LogEntryInterval instance = new LogEntryInterval();\n float expResult = 0.0F;\n float result = instance.getMeanResponseTime();\n assertEquals( expResult, result, 0.0 );\n }",
"class_method_signature": "LogEntryInterv... | {
"fields": [
{
"declarator": "intervalNumber",
"modifier": "private",
"original_string": "private int intervalNumber;",
"type": "int",
"var_name": "intervalNumber"
},
{
"declarator": "intervalLength",
"modifier": "private",
"original_string": "private int i... | {
"body": "public float getMeanResponseTime()\n {\n return meanResponseTime;\n }",
"class_method_signature": "LogEntryInterval.getMeanResponseTime()",
"constructor": false,
"full_signature": "public float getMeanResponseTime()",
"identifier": "getMeanResponseTime",
"invocations": [],
"modifie... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_51 | {
"fields": [
{
"declarator": "xmlMessage =\n \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:axis=\\\"http://axis2.wsattacker\\\">\"\n + \" <soapenv:Header/>\" + \" <soapenv:Body>\" + \" <axis:reverser>\" + \" <!--Optional:-->\"\n... | {
"body": "@Test\n public void untamperedFirst()\n {\n AttackModel attack = impl.nextAttack();\n assertThat( attack.getRequestType(), is( RequestType.UNTAMPERED ) );\n }",
"class_method_signature": "IntelligentDoSLibraryImplTest.untamperedFirst()",
"constructor": false,
"full_signature": ... | {
"fields": [
{
"declarator": "UTR_THREADS = 4",
"modifier": "private static final",
"original_string": "private static final int UTR_THREADS = 4;",
"type": "int",
"var_name": "UTR_THREADS"
},
{
"declarator": "UTR_REQUESTS = 8",
"modifier": "private static final",... | {
"body": "@Override\n public synchronized AttackModel nextAttack()\n {\n // set hasFurtherAttack to false because we cannot create a new attack\n // as long as we didn't update the measures\n hasFurtherAttack = false;\n\n return currentAttack;\n }",
"class_method_signature": "I... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_113 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX33ATest.java",
"identifier": "CollisionDJBX33ATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetHash()\n {\n String s = \"AzC8\";\n CollisionDJBX33A instance = new CollisionDJBX33A();\n int expResult = 2088944635;\n int result = instance.getHash( s );\n assertEquals( expResult, result );\n }",
"class_method_signature": "Collisio... | {
"fields": [],
"file": "plugins/Denial_of_Service/src/main/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX33A.java",
"identifier": "CollisionDJBX33A",
"interfaces": "implements CollisionInterface",
"methods": [
{
"class_method_signature": "CollisionDJBX33A.getHash( Strin... | {
"body": "@Override\n public int getHash( String s )\n {\n byte[] byteArray = s.getBytes();\n int n = byteArray.length;\n int hash = 5381;\n for ( int i = 0; i < n; i++ )\n {\n // System.out.println(i\n // +\" out of \"+n+\" mit Byte: \"+(int)byteArray[i... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_105 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "LogEntryRequest instance;",
"type": "LogEntryRequest",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryRequestTest.ja... | {
"body": "@Test\n public void testGetResponseString()\n {\n String expResult = \"test\";\n String result = instance.getResponseString();\n assertEquals( expResult, result );\n }",
"class_method_signature": "LogEntryRequestTest.testGetResponseString()",
"constructor": false,
"full_... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
"type": "String",
"var_name": "type"
},
{
"declarator": "tsSend",
"modifier": "private",
"original_string": "private long tsSend;",
"typ... | {
"body": "public String getResponseString()\n {\n return responseString;\n }",
"class_method_signature": "LogEntryRequest.getResponseString()",
"constructor": false,
"full_signature": "public String getResponseString()",
"identifier": "getResponseString",
"invocations": [],
"modifiers": "pub... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_10 | {
"fields": [
{
"declarator": "schemaAnalyser",
"modifier": "public static",
"original_string": "public static SchemaAnalyzer schemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "schemaAnalyser"
},
{
"declarator": "log",
"modifier": "public static",
"ori... | {
"body": "@Test\n public void samlOverSoapTest()\n throws Exception\n {\n log.info( \"### Reading SAML over SOAP message\" );\n SignatureManager manager = new SignatureManager();\n Document doc = DomUtilities.readDocument( \"src/test/resources/saml_over_soap.xml\" );\n manage... | {
"fields": [
{
"declarator": "schemaAnalyser",
"modifier": "private final",
"original_string": "private final SchemaAnalyzer schemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "schemaAnalyser"
},
{
"declarator": "originalDocument",
"modifier": "private final... | {
"body": "public Document getPossibility( int index )\n throws InvalidWeaknessException\n {\n WeaknessLog.clean();\n Document attackDocument = DomUtilities.createNewDomFromNode( originalDocument.getDocumentElement() );\n LOG.info( \"Creating Wrapping Possibility \" + index + \" of (\" ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_47 | {
"fields": [
{
"declarator": "xmlMessage =\n \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:axis=\\\"http://axis2.wsattacker\\\">\"\n + \" <soapenv:Header/>\" + \" <soapenv:Body>\" + \" <axis:reverser>\" + \" <!--Optional:-->\"\n... | {
"body": "@Test\n public void attackModel()\n {\n AttackModel attackModel = impl.nextAttack();\n assertThat( attackModel, notNullValue() );\n }",
"class_method_signature": "IntelligentDoSLibraryImplTest.attackModel()",
"constructor": false,
"full_signature": "@Test public void attackMode... | {
"fields": [
{
"declarator": "UTR_THREADS = 4",
"modifier": "private static final",
"original_string": "private static final int UTR_THREADS = 4;",
"type": "int",
"var_name": "UTR_THREADS"
},
{
"declarator": "UTR_REQUESTS = 8",
"modifier": "private static final",... | {
"body": "@Override\n public synchronized AttackModel nextAttack()\n {\n // set hasFurtherAttack to false because we cannot create a new attack\n // as long as we didn't update the measures\n hasFurtherAttack = false;\n\n return currentAttack;\n }",
"class_method_signature": "I... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_8 | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/library/signatureWrapping/util/id/RandomIdGeneratorTest.java",
"identifier": "RandomIdGeneratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRotate_ID()\n {\n String originalID, generatedID;\n\n originalID = \"abcmnxyz\";\n for ( int i = 0; i < 100; ++i )\n {\n generatedID = RandomIdGenerator.rotate_ID( originalID );\n assertEquals( originalID.length(), generatedID.... | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/main/java/wsattacker/library/signatureWrapping/util/id/RandomIdGenerator.java",
"identifier": "RandomIdGenerator",
"interfaces": "",
"methods": [
{
"class_method_signature": "RandomIdGenerator.RandomIdGenerator()",
"constructor": tru... | {
"body": "public static String rotate_ID( String originalID )\n {\n StringBuffer sb = new StringBuffer( originalID.length() );\n for ( int i = 0; i < originalID.length(); ++i )\n {\n char c = originalID.charAt( i );\n if ( c >= 'a' && c <= 'z' )\n {\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_30 | {
"fields": [
{
"declarator": "collisionDJBX = new CollisionDJBX()",
"modifier": "",
"original_string": "CollisionDJBX collisionDJBX = new CollisionDJBX();",
"type": "CollisionDJBX",
"var_name": "collisionDJBX"
}
],
"file": "libs/Intelligent_Denial_of_Service_Library/src/test... | {
"body": "@Test\n public void hashBackTest()\n {\n assertThat( collisionDJBX.hashBack( \"0\", 7 ), is( 776968809 ) );\n assertThat( collisionDJBX.hashBack( \"abc\", 7 ), is( 118185115 ) );\n }",
"class_method_signature": "CollisionDJBXTest.hashBackTest()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "lengthString = 10",
"modifier": "private",
"original_string": "private int lengthString = 10;",
"type": "int",
"var_name": "lengthString"
},
{
"declarator": "lengthSuffix = 4",
"modifier": "private",
"original_string": "private... | {
"body": "public int hashBack( String s, int target )\n {\n byte[] byteArray = s.getBytes( Charset.defaultCharset() );\n int n = byteArray.length;\n int hash = target;\n for ( int i = n; i > 0; i-- )\n {\n hash = ( ( hash - byteArray[i - 1] ) * -1904545857 );\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_125 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "Clock instance;",
"type": "Clock",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/clock/ClockTest.java",
"identifier": "ClockTest",... | {
"body": "@Test\n public void testUpdate()\n {\n String str1 = instance.update();\n try\n {\n Thread.sleep( 1000 );\n }\n catch ( InterruptedException ex )\n {\n Logger.getLogger( ClockTest.class.getName() ).log( Level.SEVERE, null, ex );\n ... | {
"fields": [
{
"declarator": "startTime",
"modifier": "private",
"original_string": "private long startTime;",
"type": "long",
"var_name": "startTime"
}
],
"file": "plugins/Denial_of_Service/src/main/java/wsattacker/plugin/dos/dosExtension/clock/Clock.java",
"identifier": ... | {
"body": "public String update()\n {\n long elapsedTime = System.currentTimeMillis() - startTime;\n long seconds = elapsedTime / 1000;\n long milliSecs = elapsedTime % 1000; // 1000\n String prefix;\n if ( milliSecs < 10 )\n {\n prefix = \"00\";\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_67 | {
"fields": [
{
"declarator": "xmlEntityExpansion = new XmlEntityExpansion()",
"modifier": "private final",
"original_string": "private final XmlEntityExpansion xmlEntityExpansion = new XmlEntityExpansion();",
"type": "XmlEntityExpansion",
"var_name": "xmlEntityExpansion"
}
],
... | {
"body": "@Test\n public void hasFurther()\n {\n assertThat( xmlEntityExpansion.hasFurtherParams(), is( true ) );\n }",
"class_method_signature": "XmlEntityExpansionTest.hasFurther()",
"constructor": false,
"full_signature": "@Test public void hasFurther()",
"identifier": "hasFurther",
"inv... | {
"fields": [
{
"declarator": "MIN_NUMBER_OF_ENTITY_ELEMENTS = 2",
"modifier": "private static final",
"original_string": "private static final int MIN_NUMBER_OF_ENTITY_ELEMENTS = 2;",
"type": "int",
"var_name": "MIN_NUMBER_OF_ENTITY_ELEMENTS"
},
{
"declarator": "MIN_NU... | {
"body": "@Override\n public boolean hasFurtherParams()\n {\n return numberOfEntities.hasNext() || numberOfEntityElements.hasNext();\n }",
"class_method_signature": "XmlEntityExpansion.hasFurtherParams()",
"constructor": false,
"full_signature": "@Override public boolean hasFurtherParams()",
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_88 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryIntervalTest.java",
"identifier": "LogEntryIntervalTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetIntervalNumber()\n {\n int intervalNumber = 0;\n LogEntryInterval instance = new LogEntryInterval();\n instance.setIntervalNumber( intervalNumber );\n }",
"class_method_signature": "LogEntryIntervalTest.testSetIntervalNumber()",
"constructor": fa... | {
"fields": [
{
"declarator": "intervalNumber",
"modifier": "private",
"original_string": "private int intervalNumber;",
"type": "int",
"var_name": "intervalNumber"
},
{
"declarator": "intervalLength",
"modifier": "private",
"original_string": "private int i... | {
"body": "public void setIntervalNumber( int intervalNumber )\n {\n this.intervalNumber = intervalNumber;\n }",
"class_method_signature": "LogEntryInterval.setIntervalNumber( int intervalNumber )",
"constructor": false,
"full_signature": "public void setIntervalNumber( int intervalNumber )",
"id... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_71 | {
"fields": [
{
"declarator": "xmlAttributeCount = new XmlAttributeCount()",
"modifier": "private final",
"original_string": "private final XmlAttributeCount xmlAttributeCount = new XmlAttributeCount();",
"type": "XmlAttributeCount",
"var_name": "xmlAttributeCount"
}
],
"file... | {
"body": "@Test\n public void minimalTest()\n throws ParserConfigurationException\n {\n xmlAttributeCount.nextParam();\n\n PayloadPosition payloadPosition = PayloadPosition.ELEMENT;\n String xml = IDoSTestHelper.createTestString( payloadPosition );\n\n DoSAttack minimal = xml... | {
"fields": [
{
"declarator": "MIN_NUMBER_OF_ATTRIBUTES = 2",
"modifier": "private static final",
"original_string": "private static final int MIN_NUMBER_OF_ATTRIBUTES = 2;",
"type": "int",
"var_name": "MIN_NUMBER_OF_ATTRIBUTES"
},
{
"declarator": "possiblePossitions = ... | {
"body": "@Override\n public DoSAttack minimal()\n {\n XmlAttributeCount xmlAttributeCount = new XmlAttributeCount();\n xmlAttributeCount.currentName = this.currentName;\n xmlAttributeCount.currentNumberOfAttributes = MIN_NUMBER_OF_ATTRIBUTES;\n\n return xmlAttributeCount;\n }",
... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_26 | {
"fields": [
{
"declarator": "log",
"modifier": "public static",
"original_string": "public static Logger log;",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "schemaAnalyser",
"modifier": "public static",
"original_string": "public static SchemaAn... | {
"body": "@Test\n public void testSomething()\n throws FileNotFoundException, XPathExpressionException, SAXException, IOException, InvalidPayloadException,\n InvalidWeaknessException\n {\n DetectionManager detectManager = null;\n DetectionReport detectReport = null;\n Encrypt... | {
"fields": [
{
"declarator": "m_DetectionReport",
"modifier": "private final",
"original_string": "private final DetectionReport m_DetectionReport;",
"type": "DetectionReport",
"var_name": "m_DetectionReport"
},
{
"declarator": "m_InputFile",
"modifier": "private... | {
"body": "public DetectionReport getDetectionReport()\n {\n return m_DetectionReport;\n }",
"class_method_signature": "AvoidingManager.getDetectionReport()",
"constructor": false,
"full_signature": "public DetectionReport getDetectionReport()",
"identifier": "getDetectionReport",
"invocations"... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_133 | {
"fields": [
{
"declarator": "t",
"modifier": "private static",
"original_string": "private static GenericDosPluginTest t;",
"type": "GenericDosPluginTest",
"var_name": "t"
},
{
"declarator": "attackPlugin",
"modifier": "private static",
"original_string": ... | {
"body": "@Test\n public void testCreateTamperedRequest()\n {\n t.testCreateTamperedRequest( attackPlugin );\n }",
"class_method_signature": "XmlAttributeCountTest.testCreateTamperedRequest()",
"constructor": false,
"full_signature": "@Test public void testCreateTamperedRequest()",
"identifie... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "optionNumberAttributes",
"modifier"... | {
"body": "@Override\n public void createTamperedRequest()\n {\n\n // create payload string for selected hash algorithms\n StringBuilder sb = new StringBuilder();\n sb.append( \"\" );\n\n // create attribute string\n for ( int i = 0; i < optionNumberAttributes.getValue(); i++ ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_109 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX31ATest.java",
"identifier": "CollisionDJBX31ATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCollisionsFail()\n {\n CollisionDJBX31A instance = new CollisionDJBX31A();\n // Alle 4 erzeugen anderes Ergebnis, es gilt Ez <> FY\n\n int t1 = instance.getHash( \"Ez\" );\n int t2 = instance.getHash( \"Fy\" );\n int t3 = instance.getHash( \"... | {
"fields": [
{
"declarator": "logger = Logger.getLogger( CollisionDJBX31A.class.getName() )",
"modifier": "private final",
"original_string": "private final Logger logger = Logger.getLogger( CollisionDJBX31A.class.getName() );",
"type": "Logger",
"var_name": "logger"
}
],
"f... | {
"body": "@Override\n public int getHash( String s )\n {\n byte[] byteArray = s.getBytes();\n int n = byteArray.length;\n int hash = 0;\n for ( int i = 0; i < n; i++ )\n {\n // System.out.println(i\n // +\" out of \"+n+\" mit Byte: \"+(int)byteArray[i]+\... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_4 | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/test/java/wsattacker/library/signatureWrapping/util/signature/weakness/SignatureManipulationHelperTest.java",
"identifier": "SignatureManipulationHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveSignature_0_two_contained()\n {\n Document doc = generateDummySamlDocument( true, true, false );\n List<Element> sigList = DomUtilities.findChildren( doc.getDocumentElement(), \"Signature\", URI_NS_DS, true );\n assertEquals( 2, sigList.size() );\n\n... | {
"fields": [],
"file": "libs/Signature_Wrapping_Library/src/main/java/wsattacker/library/signatureWrapping/util/signature/weakness/SignatureManipulationHelper.java",
"identifier": "SignatureManipulationHelper",
"interfaces": "",
"methods": [
{
"class_method_signature": "SignatureManipulationHelper.... | {
"body": "public static void removeSignature( Document msg, int which )\n {\n List<Element> signatures = DomUtilities.findChildren( msg, \"Signature\", NamespaceConstants.URI_NS_DS, true );\n Element toRemove = signatures.get( which );\n toRemove.getParentNode().removeChild( toRemove );\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_40 | {
"fields": [
{
"declarator": "xmlWithPlaceholder = \"<soapenv:Envelope $$PAYLOADATTR$$>\"\n + \" <soapenv:Header $$PAYLOADATTR$$>$$PAYLOADELEMENT$$</soapenv:Header>\"\n + \" <soapenv:Body $$PAYLOADATTR$$>\" + \" <cxf:celsiusToFarenheit>\" + \" <arg0>1</arg0>\"\n + \" ... | {
"body": "@Test\n public void createContentTest()\n {\n Finding finding = new Finding();\n finding.start = 18;\n finding.end = 33;\n finding.placeholder = \"$$PAYLOADATTR$$\";\n\n MatcherPosition matcherPosition = new MatcherPosition( xmlWithPlaceholder, finding );\n a... | {
"fields": [
{
"declarator": "xmlWithPlaceholder",
"modifier": "private final",
"original_string": "private final String xmlWithPlaceholder;",
"type": "String",
"var_name": "xmlWithPlaceholder"
},
{
"declarator": "finding",
"modifier": "private final",
"ori... | {
"body": "@Override\n public String createPlaceholder( PayloadPosition payloadPosition )\n {\n String pre = removePlaceholder( xmlWithPlaceholder.substring( 0, finding.start ) );\n String post = removePlaceholder( xmlWithPlaceholder.substring( finding.end, xmlWithPlaceholder.length() ) );\n\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_17 | {
"fields": [
{
"declarator": "m_SchemaAnalyser",
"modifier": "private static",
"original_string": "private static SchemaAnalyzer m_SchemaAnalyser;",
"type": "SchemaAnalyzer",
"var_name": "m_SchemaAnalyser"
},
{
"declarator": "log",
"modifier": "private static",
... | {
"body": "@Test\n public void testGetDetectionReport()\n {\n /*\n * System.out.println(\"getDetectionReport\"); AttackManager instance = null; DetectionReport expResult = null;\n * DetectionReport result = instance.getDetectionReport(); assertEquals(expResult, result); // TODO review the... | {
"fields": [
{
"declarator": "m_DetectionReport",
"modifier": "private final",
"original_string": "private final DetectionReport m_DetectionReport;",
"type": "DetectionReport",
"var_name": "m_DetectionReport"
},
{
"declarator": "m_InputFile",
"modifier": "private... | {
"body": "public DetectionReport getDetectionReport()\n {\n return m_DetectionReport;\n }",
"class_method_signature": "AttackManager.getDetectionReport()",
"constructor": false,
"full_signature": "public DetectionReport getDetectionReport()",
"identifier": "getDetectionReport",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_102 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "LogEntryRequest instance;",
"type": "LogEntryRequest",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryRequestTest.ja... | {
"body": "@Test\n public void testGetFaultFlag()\n {\n boolean expResult = false;\n boolean result = instance.getFaultFlag();\n assertEquals( expResult, result );\n }",
"class_method_signature": "LogEntryRequestTest.testGetFaultFlag()",
"constructor": false,
"full_signature": "@Te... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
"type": "String",
"var_name": "type"
},
{
"declarator": "tsSend",
"modifier": "private",
"original_string": "private long tsSend;",
"typ... | {
"body": "public boolean getFaultFlag()\n {\n return faultFlag;\n }",
"class_method_signature": "LogEntryRequest.getFaultFlag()",
"constructor": false,
"full_signature": "public boolean getFaultFlag()",
"identifier": "getFaultFlag",
"invocations": [],
"modifiers": "public",
"parameters": "... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_114 | {
"fields": [],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX33ATest.java",
"identifier": "CollisionDJBX33ATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCollisionsFail()\n {\n CollisionDJBX33A instance = new CollisionDJBX33A();\n // Alle 4 erzeugen anderes Ergebnis, es gilt Ez <> FY\n\n int t1 = instance.getHash( \"AB\" );\n int t2 = instance.getHash( \"Cd\" );\n int t3 = instance.getHash( \"... | {
"fields": [],
"file": "plugins/Denial_of_Service/src/main/java/wsattacker/plugin/dos/dosExtension/attackClasses/hashDos/CollisionDJBX33A.java",
"identifier": "CollisionDJBX33A",
"interfaces": "implements CollisionInterface",
"methods": [
{
"class_method_signature": "CollisionDJBX33A.getHash( Strin... | {
"body": "@Override\n public int getHash( String s )\n {\n byte[] byteArray = s.getBytes();\n int n = byteArray.length;\n int hash = 5381;\n for ( int i = 0; i < n; i++ )\n {\n // System.out.println(i\n // +\" out of \"+n+\" mit Byte: \"+(int)byteArray[i... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_56 | {
"fields": [
{
"declarator": "notPossibleState = new PossibleState()",
"modifier": "private final",
"original_string": "private final PossibleState notPossibleState = new PossibleState();",
"type": "PossibleState",
"var_name": "notPossibleState"
}
],
"file": "libs/Intelligen... | {
"body": "@Test\n public void notPossibleTest()\n {\n IntelligentDoSLibraryImpl impl = Mockito.mock( IntelligentDoSLibraryImpl.class );\n\n // --> TAMPERED\n AttackModel attackModel = create( RequestType.TAMPERED, \"\" );\n notPossibleState.update( impl, attackModel );\n veri... | {
"fields": [
{
"declarator": "RESENDS = 1",
"modifier": "private static final",
"original_string": "private static final int RESENDS = 1;",
"type": "int",
"var_name": "RESENDS"
},
{
"declarator": "minParamItem = new CommonParamItem( 1, 1, 1000 )",
"modifier": "pr... | {
"body": "@Override\n public void update( IntelligentDoSLibraryImpl STATE_CONTEXT, AttackModel attackModel )\n {\n switch ( verify )\n {\n case NONE:\n reference = attackModel;\n\n if ( attackModel.isAllSOAPFault() )\n {\n ... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_95 | {
"fields": [
{
"declarator": "instance",
"modifier": "",
"original_string": "LogEntryRequest instance;",
"type": "LogEntryRequest",
"var_name": "instance"
}
],
"file": "plugins/Denial_of_Service/src/test/java/wsattacker/plugin/dos/dosExtension/logEntry/LogEntryRequestTest.ja... | {
"body": "@Test\n public void testSetTsSend()\n {\n long tsSend = 100L;\n instance.setTsSend( tsSend );\n }",
"class_method_signature": "LogEntryRequestTest.testSetTsSend()",
"constructor": false,
"full_signature": "@Test public void testSetTsSend()",
"identifier": "testSetTsSend",
"... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final String type;",
"type": "String",
"var_name": "type"
},
{
"declarator": "tsSend",
"modifier": "private",
"original_string": "private long tsSend;",
"typ... | {
"body": "public void setTsSend( long tsSend )\n {\n this.tsSend = tsSend;\n }",
"class_method_signature": "LogEntryRequest.setTsSend( long tsSend )",
"constructor": false,
"full_signature": "public void setTsSend( long tsSend )",
"identifier": "setTsSend",
"invocations": [],
"modifiers": "p... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
32533210_83 | {
"fields": [
{
"declarator": "plugins",
"modifier": "private static",
"original_string": "private static PluginContainer plugins;",
"type": "PluginContainer",
"var_name": "plugins"
},
{
"declarator": "p1",
"modifier": "private static",
"original_string": "p... | {
"body": "@Test\n public void contains()\n {\n assertTrue( plugins.contains( p1 ) );\n assertTrue( plugins.contains( p2 ) );\n }",
"class_method_signature": "TestPluginContainer.contains()",
"constructor": false,
"full_signature": "@Test public void contains()",
"identifier": "contains... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "plugins",
"modifier": "private fina... | {
"body": "public boolean contains( AbstractPlugin plugin )\n {\n return plugins.contains( plugin );\n }",
"class_method_signature": "PluginContainer.contains( AbstractPlugin plugin )",
"constructor": false,
"full_signature": "public boolean contains( AbstractPlugin plugin )",
"identifier": "cont... | {
"created": null,
"fork": null,
"fork_count": 114,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32533210,
"size": 103783,
"stargazer_count": 372,
"stars": null,
"updates": null,
"url": "https://github.com/RUB-NDS/WS-Attacker"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.