nus-yam/ex-repair huggingface dataset:
Buggy code:
public class fragment_add_vehicleEvent extends Fragment { private static final String TAG = "frg_add_vhclEvnt" ; private Toolbar toolbar ; private MaterialBetterSpinner vehicleSpinner ; private ArrayAdapter < String > spinnerAdapter ; private RecyclerView eventList ; private LayoutManager eventMan ; private Adapter eventListAdapter ; private String refID ; private ArrayList < String > labels = new ArrayList < > ( ) ; private ArrayList < String > editData ; private ArrayList < String > singleVehicle ; private HashMap < String , String > dataSet = new LinkedHashMap < > ( ) ; private HashMap < String , HashMap > roster ; private Boolean isNew = true ; public fragment_add_vehicleEvent ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onResume ( ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public ArrayAdapter < String > setVehicles ( ) { } public boolean isLegit ( ) { Boolean error = false ; if ( ( singleVehicle . indexOf ( vehicleSpinner . getText ( ) . toString ( ) ) ) == ( - 1 ) ) { vehicleSpinner . setError ( getResources ( ) . getString ( error_set_vehicle ) ) ; error = true ; } if ( dataSet . get ( "Event" ) . equals ( "" ) ) { <START_BUG> Snackbar . make ( getActivity ( ) . findViewById ( snackbar ) , getString ( error_field_event ) , LENGTH_SHORT ) . setActionTextColor ( error ) . show ( ) ; <END_BUG> error = true ; } return error ; } }

Fix:
Snackbar . make ( getActivity ( ) . findViewById ( snackbar ) , getString ( error_field_event ) , LENGTH_SHORT ) . setActionTextColor ( getResources ( ) . getColor ( error ) ) . show ( ) ;
Buggy code:
public class AsmElementFormatter { public static final String DECLARE_PRECEDENCE = "precedence" ; public static final String DECLARE_SOFT = "soft" ; public static final String DECLARE_PARENTS = "parents" ; public static final String DECLARE_WARNING = "warning" ; public static final String DECLARE_ERROR = "error" ; public static final String DECLARE_UNKNONWN = "<unknown<seq2seq4repair_space>declare>" ; public static final String POINTCUT_ABSTRACT = "<abstract<seq2seq4repair_space>pointcut>" ; public static final String POINTCUT_ANONYMOUS = "<anonymous<seq2seq4repair_space>pointcut>" ; public static final int MAX_MESSAGE_LENGTH = 18 ; public static final String DEC_LABEL = "declare" ; public void genLabelAndKind ( MethodDeclaration methodDeclaration , IProgramElement node ) { } private String genDecaLabel ( DeclareAnnotation deca ) { } private String genPrecedenceListLabel ( TypePatternList list ) { } private void setParameters ( MethodDeclaration md , IProgramElement pe ) { Argument [ ] argArray = md . arguments ; List names = new ArrayList ( ) ; List types = new ArrayList ( ) ; pe . setParameterNames ( names ) ; pe . setParameterTypes ( types ) ; if ( argArray == null ) return ; for ( int i = 0 ; i < ( argArray . length ) ; i ++ ) { String argName = new String ( argArray [ i ] . name ) ; <START_BUG> String argType = argArray [ i ] . type . toString ( ) ; <END_BUG> if ( acceptArgument ( argName , argType ) ) { names . add ( argName ) ; types . add ( argType ) ; } } } private boolean acceptArgument ( String name , String type ) { } public String genTypePatternLabel ( TypePattern tp ) { } public String genDeclareMessage ( String message ) { } private String translatePointcutName ( String name ) { } }

Fix:
String argType = argArray [ i ] . type . resolvedType . debugName ( ) ;
Buggy code:
public class dnsMessage { private dnsHeader header ; private Vector [ ] sections ; private int size ; public dnsMessage ( int id ) { } public dnsMessage ( ) { } dnsMessage ( CountedDataInputStream in ) throws IOException { } dnsMessage ( byte [ ] b ) throws IOException { } void setHeader ( dnsHeader h ) { } dnsHeader getHeader ( ) { } void addRecord ( int section , dnsRecord r ) { } boolean removeRecord ( int section , dnsRecord r ) { } dnsTSIGRecord getTSIG ( ) { } Vector getSection ( int section ) { } void toWire ( CountedDataOutputStream out ) throws IOException { } byte [ ] toWire ( ) throws IOException { } void toWireCanonical ( CountedDataOutputStream out ) throws IOException { } int numBytes ( ) { } public String sectionToString ( int i ) { } public String toString ( ) { StringBuffer sb = new StringBuffer ( ) ; <START_BUG> sb . append ( getHeader ( ) ) ; <END_BUG> for ( int i = 0 ; i < 4 ; i ++ ) sb . append ( ( ( sectionToString ( i ) ) + "\n" ) ) ; sb . append ( ( ( ";;<seq2seq4repair_space>done<seq2seq4repair_space>(" + ( numBytes ( ) ) ) + "<seq2seq4repair_space>bytes)" ) ) ; return sb . toString ( ) ; } }

Fix:
sb . append ( ( ( getHeader ( ) ) + "\n" ) ) ;
Buggy code:
public final class TestMeanShift extends MahoutTestCase { private Vector [ ] raw = null ; private final DistanceMeasure euclideanDistanceMeasure = new EuclideanDistanceMeasure ( ) ; private final IKernelProfile kernelProfile = new TriangularKernelProfile ( ) ; private static void printCanopies ( Iterable < MeanShiftCanopy > canopies ) { } private void printImage ( Iterable < MeanShiftCanopy > canopies ) { } private List < MeanShiftCanopy > getInitialCanopies ( ) { } @ Override @ Before public void setUp ( ) throws Exception { } @ Test public void testReferenceImplementation ( ) { } @ Test public void testClustererReferenceImplementation ( ) { } @ Test public void testCanopyMapperEuclidean ( ) throws Exception { } @ Test public void testCanopyReducerEuclidean ( ) throws Exception { } @ Test public void testCanopyEuclideanMRJob ( ) throws Exception { } @ Test public void testCanopyEuclideanSeqJob ( ) throws Exception { } @ Test public void testCanopyEuclideanMRJobNoClustering ( ) throws Exception { Path input = getTestTempDirPath ( "testdata" ) ; Configuration conf = new Configuration ( ) ; FileSystem fs = FileSystem . get ( input . toUri ( ) , conf ) ; Collection < VectorWritable > points = Lists . newArrayList ( ) ; for ( Vector v : raw ) { points . add ( new VectorWritable ( v ) ) ; } ClusteringTestUtils . writePointsToFile ( points , getTestTempFilePath ( "testdata//file1" ) , fs , conf ) ; ClusteringTestUtils . writePointsToFile ( points , getTestTempFilePath ( "testdata//file2" ) , fs , conf ) ; Path output = getTestTempDirPath ( "output" ) ; String [ ] args = new String [ ] { optKey ( INPUT_OPTION ) , getTestTempDirPath ( "testdata" ) . toString ( ) , optKey ( OUTPUT_OPTION ) , output . toString ( ) , optKey ( DISTANCE_MEASURE_OPTION ) , EuclideanDistanceMeasure . class . getName ( ) , optKey ( KERNEL_PROFILE_OPTION ) , TriangularKernelProfile . class . getName ( ) , optKey ( T1_OPTION ) , "4" , optKey ( T2_OPTION ) , "1" , optKey ( MAX_ITERATIONS_OPTION ) , "7" , optKey ( CONVERGENCE_DELTA_OPTION ) , "0.2" , optKey ( OVERWRITE_OPTION ) } ; ToolRunner . run ( conf , new MeanShiftCanopyDriver ( ) , args ) ; Path outPart = new Path ( output , "clusters-3-final//part-r-00000" ) ; long count = HadoopUtil . countRecords ( outPart , conf ) ; <START_BUG> assertEquals ( "count" , 3 , count ) ; <END_BUG> Iterator < ? > iterator = new org . apache . mahout . common . iterator . sequencefile . SequenceFileValueIterator < org . apache . hadoop . io . Writable > ( outPart , true , conf ) ; while ( iterator . hasNext ( ) ) { ClusterWritable next = ( ( ClusterWritable ) ( iterator . next ( ) ) ) ; MeanShiftCanopy canopy = ( ( MeanShiftCanopy ) ( next . getValue ( ) ) ) ; assertTrue ( ( ( canopy . getCenter ( ) ) instanceof DenseVector ) ) ; assertEquals ( 1 , canopy . getBoundPoints ( ) . size ( ) ) ; } } @ Test public void testCanopyEuclideanSeqJobNoClustering ( ) throws Exception { } }

Fix:
assertEquals ( "count" , 4 , count ) ;
Buggy code:
public class Start extends Application < Configuration > { public static void main ( String [ ] args ) throws Exception { } @ Override public String getName ( ) { } @ Override public void initialize ( Bootstrap < Configuration > bootstrap ) { try { bootstrap . setConfigurationSourceProvider ( ( path ) -> { final File file = new File ( path ) ; if ( file . exists ( ) ) { return new FileInputStream ( file ) ; } else { URL configResource = ClassLoader . getSystemResource ( path ) ; if ( configResource != null ) { return ClassLoader . getSystemResource ( path ) . openStream ( ) ; } else { throw new RuntimeException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>locate<seq2seq4repair_space>the<seq2seq4repair_space>configuration<seq2seq4repair_space>file<seq2seq4repair_space>specified:<seq2seq4repair_space>" + path ) ) ; } } } ) ; <START_BUG> bootstrap . addBundle ( new DynamicModuleBundle ( bootstrap , "com.pv.mfl" ) ) ; <END_BUG> bootstrap . addBundle ( new StaticAssetsBundle ( ) ) ; bootstrap . addBundle ( new SwaggerBundle ( ) ) ; bootstrap . addBundle ( new ViewBundle ( ) ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; } } @ Override public void run ( Configuration configuration , Environment environment ) throws Exception { } No newline ; at end ; of file ; }

Fix:
bootstrap . addBundle ( new DynamicModuleBundle ( bootstrap , "exprest" ) ) ;
Buggy code:
public abstract class ChangeClasspathOperation extends JavaModelOperation { protected boolean canChangeResources ; public ChangeClasspathOperation ( IJavaElement [ ] elements , boolean canChangeResources ) { } protected boolean canModifyRoots ( ) { } protected void classpathChanged ( JavaProject project ) throws JavaModelException { <START_BUG> DeltaProcessingState state = JavaModelManager . getJavaModelManager ( ) . deltaState ; <END_BUG> DeltaProcessor deltaProcessor = state . getDeltaProcessor ( ) ; ClasspathChange change = ( ( ClasspathChange ) ( deltaProcessor . classpathChanges . get ( project . getProject ( ) ) ) ) ; if ( this . canChangeResources ) { if ( ( isTopLevelOperation ( ) ) && ( ! ( ResourcesPlugin . getWorkspace ( ) . isTreeLocked ( ) ) ) ) { new ClasspathValidation ( project ) . validate ( ) ; } new ProjectReferenceChange ( project , change . oldResolvedClasspath ) . updateProjectReferencesIfNecessary ( ) ; } else { JavaElementDelta delta = new JavaElementDelta ( getJavaModel ( ) ) ; int result = change . generateDelta ( delta ) ; if ( ( result & ( ClasspathChange . HAS_DELTA ) ) != 0 ) { addDelta ( delta ) ; change . requestIndexing ( ) ; state . addClasspathValidation ( project ) ; } if ( ( result & ( ClasspathChange . HAS_PROJECT_CHANGE ) ) != 0 ) { state . addProjectReferenceChange ( project , change . oldResolvedClasspath ) ; } } } protected ISchedulingRule getSchedulingRule ( ) { } public boolean isReadOnly ( ) { } }

Fix:
DeltaProcessingState state = JavaModelManager . getDeltaState ( ) ;
Buggy code:
public class TransformOutputStream extends OutputStream { private OutputStream target ; private Transformer transform ; public TransformOutputStream ( OutputStream target , Transformer transform ) { } @ Override public void write ( byte [ ] bytes , int off , int len ) throws IOException { byte [ ] newBytes = transform . transform ( bytes , off , len ) ; <START_BUG> target . write ( newBytes , off , len ) ; <END_BUG> } @ Override public void write ( int b ) throws IOException { } public void write ( Object obj ) throws IOException { } @ Override public void close ( ) throws IOException { } }

Fix:
target . write ( newBytes ) ;
Buggy code:
public class Button extends Control { String text = "" ; Image image ; int cIcon ; boolean isImage ; boolean tracking ; public Button ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void click ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultThemeFont ( ) { } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } public int getAlignment ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public boolean getSelection ( ) { } public String getText ( ) { } Rect getInset ( ) { } int kEventControlHit ( int nextHandler , int theEvent , int userData ) { } int kEventMouseDown ( int nextHandler , int theEvent , int userData ) { int result = super . kEventMouseDown ( nextHandler , theEvent , userData ) ; if ( result == ( OS . noErr ) ) return result ; display . grabControl = null ; display . runDeferredEvents ( ) ; tracking = false ; result = OS . CallNextEventHandler ( nextHandler , theEvent ) ; if ( tracking ) { org . eclipse . swt . internal . carbon . Point outPt = new org . eclipse . swt . internal . carbon . Point ( ) ; OS . GetGlobalMouse ( outPt ) ; Rect rect = new Rect ( ) ; int window = OS . GetControlOwner ( handle ) ; int x ; int y ; if ( OS . HIVIEW ) { CGPoint pt = new CGPoint ( ) ; pt . x = outPt . h ; pt . y = outPt . v ; OS . HIViewConvertPoint ( pt , 0 , handle ) ; x = ( ( int ) ( pt . x ) ) ; y = ( ( int ) ( pt . y ) ) ; OS . GetWindowBounds ( window , ( ( short ) ( kWindowStructureRgn ) ) , rect ) ; } else { OS . GetControlBounds ( handle , rect ) ; x = ( outPt . h ) - ( rect . left ) ; y = ( outPt . v ) - ( rect . top ) ; OS . GetWindowBounds ( window , ( ( short ) ( kWindowContentRgn ) ) , rect ) ; } x -= rect . left ; y -= rect . top ; short [ ] button = new short [ 1 ] ; OS . GetEventParameter ( theEvent , kEventParamMouseButton , typeMouseButton , null , 2 , null , button ) ; int chord = OS . GetCurrentEventButtonState ( ) ; int modifiers = OS . GetCurrentEventKeyModifiers ( ) ; <START_BUG> sendMouseEvent ( MouseUp , button [ 0 ] , true , chord , ( ( short ) ( x ) ) , ( ( short ) ( y ) ) , modifiers ) ; <END_BUG> } tracking = false ; return result ; } int kEventControlTrack ( int nextHandler , int theEvent , int userData ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAlignment ( int alignment ) { } void _setAlignment ( int alignment ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } void setDefault ( boolean value ) { } public void setImage ( Image image ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int traversalCode ( int key , int theEvent ) { } }

Fix:
sendMouseEvent ( MouseUp , button [ 0 ] , clickCount , true , chord , ( ( short ) ( x ) ) , ( ( short ) ( y ) ) , modifiers ) ;
Buggy code:
public class SonarHttpRequester { private static final String SONAR_API_GATE = "//api//events?resource=%s&format=json&categories=Alert" ; private final HttpClientContext context ; public SonarHttpRequester ( ) { } public String getAPIInfo ( JobConfigData projectKey , GlobalConfigDataForSonarInstance globalConfigDataForSonarInstance ) throws QGException { String sonarApiGate = ( globalConfigDataForSonarInstance . getSonarUrl ( ) ) + ( String . format ( SonarHttpRequester . SONAR_API_GATE , projectKey . getProjectKey ( ) ) ) ; CloseableHttpClient client = HttpClientBuilder . create ( ) . build ( ) ; HttpPost loginHttpPost = new HttpPost ( ( ( globalConfigDataForSonarInstance . getSonarUrl ( ) ) + "//sessions//login" ) ) ; List < NameValuePair > nvps = new ArrayList < > ( ) ; nvps . add ( new BasicNameValuePair ( "login" , globalConfigDataForSonarInstance . getUsername ( ) ) ) ; <START_BUG> nvps . add ( new BasicNameValuePair ( "password" , globalConfigDataForSonarInstance . getPassword ( ) ) ) ; <END_BUG> nvps . add ( new BasicNameValuePair ( "remember_me" , "1" ) ) ; loginHttpPost . setEntity ( createEntity ( nvps ) ) ; loginHttpPost . addHeader ( CONTENT_TYPE , "application//x-www-form-urlencoded" ) ; executePostRequest ( client , loginHttpPost ) ; HttpGet request = new HttpGet ( String . format ( sonarApiGate , projectKey . getProjectKey ( ) ) ) ; String responseFromGet = executeGetRequest ( client , request ) ; return responseFromGet ; } private String executeGetRequest ( CloseableHttpClient client , HttpGet request ) throws QGException { } private void executePostRequest ( CloseableHttpClient client , HttpPost loginHttpPost ) throws QGException { } private UrlEncodedFormEntity createEntity ( List < NameValuePair > nvps ) throws QGException { } }

Fix:
nvps . add ( new BasicNameValuePair ( "password" , globalConfigDataForSonarInstance . getPass ( ) ) ) ;
Buggy code:
public class StatelessComponentCreateServiceFactory extends EJBComponentCreateServiceFactory { @ Override public BasicComponentCreateService constructService ( ComponentConfiguration configuration ) { if ( ( this . ejbJarConfiguration ) == null ) { throw EjbMessages . MESSAGES . ejbJarConfigNotBeenSet ( this , configuration . getComponentName ( ) ) ; } configuration . getCreateDependencies ( ) . add ( new org . jboss . as . ee . component . DependencyConfigurator < StatelessSessionComponentCreateService > ( ) { @ Override public void configureDependency ( ServiceBuilder < ? > builder , StatelessSessionComponentCreateService service ) { <START_BUG> builder . addDependency ( SERVICE_NAME ) ; <END_BUG> builder . addDependency ( OPTIONAL , JBOSS . append ( "clustering" , "group" , "ejb" , "default" ) , Group . class , service . getGroupInjector ( ) ) ; builder . addDependency ( OPTIONAL , EJBRemoteConnectorService . SERVICE_NAME ) ; } } ) ; return new StatelessSessionComponentCreateService ( configuration , this . ejbJarConfiguration ) ; } }

Fix:
builder . addDependency ( OPTIONAL , SERVICE_NAME ) ;
Buggy code:
public class SecurityManagementService implements Service < ISecurityManagement > { public static final ServiceName SERVICE_NAME = JBOSS_SECURITY . append ( "security-management" ) ; private static final Logger log = Logger . getLogger ( "org.jboss.as.security" ) ; private final String authenticationManagerClassName ; private final boolean deepCopySubjectMode ; private final String callbackHandlerClassName ; private final String authorizationManagerClassName ; private final String auditManagerClassName ; private final String identityTrustManagerClassName ; private final String mappingManagerClassName ; private ISecurityManagement securityManagement ; public SecurityManagementService ( String authenticationManagerClassName , boolean deepCopySubjectMode , String callbackHandlerClassName , String authorizationManagerClassName , String auditManagerClassName , String identityTrustManagerClassName , String mappingManagerClassName ) { } @ Override public void start ( StartContext context ) throws StartException { if ( SecurityManagementService . log . isDebugEnabled ( ) ) SecurityManagementService . log . debug ( "Starting<seq2seq4repair_space>SecurityManagementService" ) ; <START_BUG> JNDIBasedSecurityManagement securityManagement = JNDIBasedSecurityManagement . getInstance ( ) ; <END_BUG> securityManagement . setAuthenticationManagerClassName ( authenticationManagerClassName ) ; securityManagement . setDeepCopySubjectMode ( deepCopySubjectMode ) ; securityManagement . setCallbackHandlerClassName ( callbackHandlerClassName ) ; securityManagement . setAuthorizationManagerClassName ( authorizationManagerClassName ) ; securityManagement . setAuditManagerClassName ( auditManagerClassName ) ; securityManagement . setIdentityTrustManagerClassName ( identityTrustManagerClassName ) ; securityManagement . setMappingManagerClassName ( mappingManagerClassName ) ; this . securityManagement = securityManagement ; } @ Override public void stop ( StopContext context ) { } @ Override public ISecurityManagement getValue ( ) throws IllegalStateException { } }

Fix:
JNDIBasedSecurityManagement securityManagement = new JNDIBasedSecurityManagement ( ) ;
Buggy code:
public class ConditionTask extends ConditionBase { private String property ; private String value = "true" ; public void setProperty ( String p ) { } public void setValue ( String v ) { } public void execute ( ) throws BuildException { if ( ( countConditions ( ) ) > 1 ) { throw new BuildException ( "You<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>nest<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>condition<seq2seq4repair_space>into<seq2seq4repair_space><condition>" ) ; } if ( ( countConditions ( ) ) < 1 ) { throw new BuildException ( "You<seq2seq4repair_space>must<seq2seq4repair_space>nest<seq2seq4repair_space>a<seq2seq4repair_space>condition<seq2seq4repair_space>into<seq2seq4repair_space><condition>" ) ; } Condition c = ( ( Condition ) ( getConditions ( ) . nextElement ( ) ) ) ; if ( c . eval ( ) ) { <START_BUG> getProject ( ) . setProperty ( property , value ) ; <END_BUG> } } }

Fix:
getProject ( ) . setNewProperty ( property , value ) ;
Buggy code:
public class InternalVertex { private Object vertex ; private DList adjacencyList ; public InternalVertex ( Object a ) { } public DList getAdjacencyList ( ) { } public Object getVertex ( ) { } public int getAdjacencyListSize ( ) { } public void adjacencyListInsert ( Object a ) { <START_BUG> ( ( Edge ) ( a ) ) . node = adjacencyList . insertBackWithReference ( a ) ; <END_BUG> } }

Fix:
( ( Edge ) ( a ) ) . node = adjacencyList . insertBack2 ( a ) ;
Buggy code:
public class DomainMatrix extends Visualizer { private static final String type = "domain_matrix" ; final Variable [ ] [ ] vars ; public DomainMatrix ( Variable [ ] [ ] vars , String display , int width , int height ) { } protected DomainMatrix ( Variable [ ] [ ] vars , String type , String display , int width , int height ) { } public DomainMatrix ( Variable [ ] [ ] vars , String display , int x , int y , int width , int height , String group , int min , int max ) { } public DomainMatrix ( Variable [ ] [ ] vars , String type , String display , int x , int y , int width , int height , String group , int min , int max ) { } @ Override protected void print ( boolean focus , Decision decision ) { for ( int i = 0 ; i < ( vars . length ) ; i ++ ) { for ( int j = 0 ; j < ( vars [ i ] . length ) ; j ++ ) { writer . var ( vars [ i ] [ j ] , ( ( ( i + 1 ) + "<seq2seq4repair_space>" ) + ( j + 1 ) ) , 3 ) ; } } if ( decision != null ) { for ( int i = 0 ; i < ( vars . length ) ; i ++ ) { for ( int j = 0 ; j < ( vars [ i ] . length ) ; j ++ ) { <START_BUG> if ( ( decision . getDecisionVariable ( ) ) == ( vars [ i ] [ j ] ) ) { <END_BUG> if ( focus ) { writer . focus ( ( ( ( i + 1 ) + ( Writer . _S ) ) + ( j + 1 ) ) , group ) ; } else { writer . fail ( ( ( ( i + 1 ) + ( Writer . _S ) ) + ( j + 1 ) ) , group , ( ( Integer ) ( decision . getDecisionValue ( ) ) ) ) ; } } } } } } }

Fix:
if ( ( decision . getDecisionVariables ( ) ) == ( vars [ i ] [ j ] ) ) {
Buggy code:
public class StaticWordValueEncoder extends WordValueEncoder { private Map < String , Double > dictionary ; private double missingValueWeight = 1 ; public StaticWordValueEncoder ( String name ) { } @ Override protected int hashForProbe ( String originalForm , Vector data , String name , int i ) { <START_BUG> return hash ( name , i , data . size ( ) ) ; <END_BUG> } public void setDictionary ( Map < String , Double > dictionary ) { } public void setMissingValueWeight ( double missingValueWeight ) { } @ Override protected double weight ( String originalForm ) { } }

Fix:
return hash ( name , originalForm , ( ( WORD_LIKE_VALUE_HASH_SEED ) + i ) , data . size ( ) ) ;
Buggy code:
public class TsvEntityTest { @ Test public void tsv_entriesAreEscaped ( ) { TsvEntity csvEntity = new TsvEntity ( ) ; Map jsonMap = ImmutableMap . of ( "hash" , "hash1" , "entry" , ImmutableMap . of ( "key1" , "value1" , "key2" , "val\tue2" , "key3" , "val\"ue3" , "key4" , "val\nue4" ) ) ; JsonNode node = JsonObjectMapper . convert ( jsonMap , JsonNode . class ) ; AbstractView view = new SingleResultView ( "someTemplate" , node ) ; Object result = csvEntity . convert ( view ) ; <START_BUG> assertThat ( result . toString ( ) , equalTo ( "hash\tkey1\tkey2\tkey3\tkey4\nhash1\tvalue1\t\"val\tue2\"\t\"val\"\"ue3\"\t\"val\nue4\"" ) ) ; <END_BUG> } }

Fix:
assertThat ( result . toString ( ) , equalTo ( "hash\tkey1\tkey2\tkey3\tkey4\r\nhash1\tvalue1\t\"val\tue2\"\t\"val\"\"ue3\"\t\"val\nue4\"" ) ) ;
Buggy code:
public class LinkCard extends Item { public LinkCard ( ) { } @ SideOnly ( Side . CLIENT ) public void registerIcons ( IIconRegister par1IconRegister ) { } @ Override public void addInformation ( ItemStack stack , EntityPlayer player , List list , boolean bool ) { } @ Override public boolean onItemUse ( ItemStack itemstack , EntityPlayer player , World world , int x , int y , int z , int side , float px , float py , float pz ) { if ( world . isRemote ) return true ; MovingObjectPosition movingobjectposition = this . getMovingObjectPositionFromPlayer ( world , player , true ) ; if ( ( movingobjectposition != null ) && ( ( movingobjectposition . typeOfHit ) == ( MovingObjectType . BLOCK ) ) ) { int i = movingobjectposition . blockX ; int j = movingobjectposition . blockY ; int k = movingobjectposition . blockZ ; if ( ( world . getTileEntity ( i , j , k ) ) instanceof TileEntityChest ) { <START_BUG> player . addChatMessage ( new net . minecraft . util . ChatComponentText ( StatCollector . translateToLocal ( ( ( ( ( ( "item.linkCard.message.stored" + i ) + "<seq2seq4repair_space>" ) + j ) + "<seq2seq4repair_space>" ) + k ) ) ) ) ; <END_BUG> itemstack . stackTagCompound = new NBTTagCompound ( ) ; itemstack . stackTagCompound . setIntArray ( "storageLocation" , new int [ ] { i , j , k } ) ; } if ( ( world . getTileEntity ( i , j , k ) ) instanceof TileVendor ) { TileVendor te = ( ( TileVendor ) ( world . getTileEntity ( i , j , k ) ) ) ; int [ ] storageLocation = itemstack . stackTagCompound . getIntArray ( "storageLocation" ) ; if ( ( storageLocation . length ) > 0 ) { player . addChatMessage ( new net . minecraft . util . ChatComponentText ( StatCollector . translateToLocal ( "item.linkCard.message.set" ) ) ) ; te . setRemoteStorage ( storageLocation ) ; player . inventory . decrStackSize ( player . inventory . currentItem , 1 ) ; } } } return true ; } }

Fix:
player . addChatMessage ( new net . minecraft . util . ChatComponentText ( ( ( ( ( ( ( StatCollector . translateToLocal ( "item.linkCard.message.stored" ) ) + i ) + "<seq2seq4repair_space>" ) + j ) + "<seq2seq4repair_space>" ) + k ) ) ) ;
Buggy code:
public final class ImplicitJPArgumentMatchingTests { @ Test public void testAspect ( ) { <START_BUG> new ClassPathXmlApplicationContext ( "implicit-jp-argument-matching-tests.xml" , getClass ( ) ) ; <END_BUG> } static class CounterAspect { public void increment ( ProceedingJoinPoint pjp , Object bean , Object argument ) throws Throwable { } } }

Fix:
new ClassPathXmlApplicationContext ( ( ( getClass ( ) . getSimpleName ( ) ) + ".xml" ) , getClass ( ) ) ;
Buggy code:
public class SystemController extends TimerTask implements GpioPinListenerDigital { private TrueSensor trueSensor ; private FalseSensor falseSensor ; private QuestionHandler questionHandler ; private int trueCount ; private int falseCount ; private String currentQuestion ; private Window window ; File file ; BufferedWriter bw ; FileWriter fw ; public static void main ( String [ ] args ) { } public void run ( ) { if ( currentQuestion . equals ( "" ) ) { currentQuestion = questionHandler . getNextQuestion ( ) ; <START_BUG> if ( ! ( currentquestion . equals ( "" ) ) ) { <END_BUG> window . setQuestionLabel ( ( ( "<html><body<seq2seq4repair_space>style='width:<seq2seq4repair_space>1200px'>" + ( currentQuestion ) ) + "<//body><//html>" ) ) ; } } else try { bw . write ( ( ( ( ( ( currentQuestion ) + "," ) + ( trueCount ) ) + "," ) + ( falseCount ) ) ) ; bw . newLine ( ) ; bw . flush ( ) ; } catch ( IOException e ) { } trueCount = 0 ; falseCount = 0 ; currentQuestion = questionHandler . getNextQuestion ( ) ; window . setQuestionLabel ( ( ( "<html><body<seq2seq4repair_space>style='width:<seq2seq4repair_space>1200px'>" + ( currentQuestion ) ) + "<//body><//html>" ) ) ; } public SystemController ( ) { } public void handleGpioPinDigitalStateChangeEvent ( GpioPinDigitalStateChangeEvent event ) { } }

Fix:
if ( ! ( currentQuestion . equals ( "" ) ) ) {
Buggy code:
public class ArquillianDependencyProcessor implements DeploymentUnitProcessor { private static ModuleIdentifier ARQUILLIAN_JUNIT_ID = ModuleIdentifier . create ( "org.jboss.arquillian.junit" ) ; private static ModuleIdentifier SHRINKWRAP_ID = ModuleIdentifier . create ( "org.jboss.shrinkwrap.api" ) ; private static ModuleIdentifier JUNIT_ID = ModuleIdentifier . create ( "junit.junit" ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; <START_BUG> final ModuleLoader moduleLoader = Module . getSystemModuleLoader ( ) ; <END_BUG> final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; if ( ( deploymentUnit . getAttachment ( KEY ) ) != null ) { addDepdenency ( moduleSpecification , moduleLoader , ArquillianDependencyProcessor . ARQUILLIAN_JUNIT_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , ArquillianDependencyProcessor . SHRINKWRAP_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , ArquillianDependencyProcessor . JUNIT_ID ) ; } } private void addDepdenency ( ModuleSpecification moduleSpecification , ModuleLoader moduleLoader , ModuleIdentifier moduleIdentifier ) { } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ;
Buggy code:
public class RestApplication extends Application { private static Context context ; @ Override public void onCreate ( ) { } public static RestClient getRestClient ( ) { } public static boolean logout ( ) { } public static boolean isLoggedIn ( ) { <START_BUG> return ( ( RestApplication . getRestClient ( ) ) != null ) && ( RestApplication . getRestClient ( ) . isAuthenticated ( ) ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return RestApplication . getRestClient ( ) . isAuthenticated ( ) ;
Buggy code:
public class PageCreateKeystore extends WizardPage implements Listener { public static final String PAGE_NAME = "SignPageCreateKeystore" ; private String keystorePath ; private String keystoreName ; private String project ; private String name ; private boolean generated = false ; private Button bGenerate = null ; private Button bEchoKeystorePassword = null ; private Button bEchoKeyPassword = null ; private Combo cKeyAlgorithm = null ; private Label lPreview = null ; private Label lResult = null ; private Text tCommonName = null ; private Text tOrganizationalUnit = null ; private Text tOrganization = null ; private Text tLocation = null ; private Text tState = null ; private Text tCountry = null ; private Text tKeystoreName = null ; private Text tKeystorePassword = null ; private Text tKeyName = null ; private Text tKeyPassword = null ; private static final int LABELWIDTH = 160 ; private static final int TEXTHEIGHT = 40 ; private Signature signature = null ; private Keystore keystore = null ; public PageCreateKeystore ( final Signature signature , final String project , final String name ) { } public void createControl ( final Composite parent ) { } private void createPageContent ( final Composite parent ) { } private void addListeners ( ) { } private void dialogChanged ( ) { } private void updateStatus ( final String message , final int status ) { } public void handleEvent ( final Event e ) { } private void echoPassword ( final Event e ) { } private void createKeystore ( ) { } public void onEnterPage ( ) { } public IWizardPage getNextPage ( ) { } private void saveDataToModel ( ) { signature . setKeystore ( keystore ) ; signature . setKeystorePassword ( tKeystorePassword . getText ( ) . toCharArray ( ) ) ; signature . setKeyPassword ( tKeyPassword . getText ( ) . toCharArray ( ) ) ; <START_BUG> signature . setKeyAlias ( tKeyName . getText ( ) ) ; <END_BUG> if ( cKeyAlgorithm . getText ( ) . equals ( "DSA" ) ) { signature . setKeyAlgorithm ( "SHA1withDSA" ) ; } else if ( cKeyAlgorithm . getText ( ) . equals ( "EC" ) ) { signature . setKeyAlgorithm ( "SHA1withECDSA" ) ; } else if ( cKeyAlgorithm . getText ( ) . equals ( "RSA" ) ) { signature . setKeyAlgorithm ( "SHA1withRSA" ) ; } } }

Fix:
signature . setKeyName ( tKeyName . getText ( ) ) ;
Buggy code:
public class Patch extends AbstractTask { private File m_originalFile ; private File m_patchFile ; private boolean m_backups ; private boolean m_ignorewhitespace ; private boolean m_reverse ; private boolean m_quiet ; private Integer m_strip ; public void setBackups ( final boolean backups ) { } public void setIgnorewhitespace ( final boolean ignorewhitespace ) { } public void setOriginalfile ( final File originalFile ) { } public void setPatchfile ( final File patchFile ) { } public void setQuiet ( final boolean quiet ) { } public void setReverse ( final boolean reverse ) { } public void setStrip ( final Integer strip ) { } public void execute ( ) throws TaskException { validate ( ) ; final Execute2 exe = new Execute2 ( ) ; setupLogger ( exe ) ; final Commandline cmd = buildCommand ( ) ; <START_BUG> exe . setCommandline ( cmd . getCommandline ( ) ) ; <END_BUG> try { exe . execute ( ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } private void validate ( ) throws TaskException { } private Commandline buildCommand ( ) { } }

Fix:
exe . setCommandline ( cmd ) ;
Buggy code:
public final class Cookies { public static final int INITIAL_SIZE = 4 ; ServerCookie [ ] scookies = new ServerCookie [ Cookies . INITIAL_SIZE ] ; int cookieCount = 0 ; boolean unprocessed = true ; MimeHeaders headers ; public Cookies ( MimeHeaders headers ) { } public Cookies ( ) { } public void setHeaders ( MimeHeaders headers ) { } public void recycle ( ) { } public String toString ( ) { } public ServerCookie getCookie ( int idx ) { } public int getCookieCount ( ) { } public ServerCookie addCookie ( ) { } public void processCookies ( MimeHeaders headers ) { } void processCookieHeader ( byte [ ] bytes , int off , int len ) { } public static int skipSpaces ( byte [ ] bytes , int off , int end ) { } public static int findDelim1 ( byte [ ] bytes , int off , int end ) { } public static int findDelim2 ( byte [ ] bytes , int off , int end ) { while ( off < end ) { byte b = bytes [ off ] ; <START_BUG> if ( ( ( b == '<seq2seq4repair_space>' ) || ( b == ';' ) ) || ( b == ',' ) ) <END_BUG> return off ; off ++ ; } return off ; } public static int indexOf ( byte [ ] bytes , int off , int end , byte qq ) { } public static int indexOf ( byte [ ] bytes , int off , int end , char qq ) { } public static boolean equals ( String s , byte [ ] b , int start , int end ) { } private void processCookieHeader ( String cookieString ) { } private static String stripQuote ( String value ) { } static final int dbg = 0 ; public void log ( String s ) { } }

Fix:
if ( ( b == ';' ) || ( b == ',' ) )
Buggy code:
class ContentPolicyBuilderImpl implements PatchTool . ContentPolicyBuilder { boolean overrideAll ; boolean ignoreModulesChanges ; final List < String > override = new ArrayList < String > ( ) ; final List < String > preserve = new ArrayList < String > ( ) ; @ Override public ContentVerificationPolicy createPolicy ( ) { return new ContentVerificationPolicy ( ) { @ Override public boolean ignoreContentValidation ( ContentItem item ) { final ContentType type = item . getContentType ( ) ; if ( ( type == ( ContentType . MODULE ) ) || ( type == ( ContentType . BUNDLE ) ) ) { <START_BUG> return ignoreModulesChanges ; <END_BUG> } final MiscContentItem misc = ( ( MiscContentItem ) ( item ) ) ; final String path = misc . getRelativePath ( ) ; if ( override . contains ( path ) ) { return true ; } if ( preserve . contains ( path ) ) { return true ; } return overrideAll ; } @ Override public boolean preserveExisting ( ContentItem item ) { final ContentType type = item . getContentType ( ) ; if ( type == ( ContentType . MISC ) ) { final MiscContentItem misc = ( ( MiscContentItem ) ( item ) ) ; final String path = misc . getRelativePath ( ) ; return preserve . contains ( path ) ; } return false ; } } ; } @ Override public ContentPolicyBuilder ignoreModuleChanges ( ) { } @ Override public ContentPolicyBuilder overrideItem ( MiscContentItem item ) { } @ Override public ContentPolicyBuilder overrideItem ( String path ) { } @ Override public ContentPolicyBuilder preserveItem ( MiscContentItem item ) { } @ Override public ContentPolicyBuilder preserveItem ( String path ) { } @ Override public ContentPolicyBuilder overrideAll ( ) { } }

Fix:
return ( ignoreModulesChanges ) | ( overrideAll ) ;
Buggy code:
public class JPAFacadeHelper { public static final String EM_KEY = "org.apache.openjpa.persistence.EntityManager" ; public static final String EMF_KEY = "org.apache.openjpa.persistence.EntityManagerFactory" ; private static final Localizer _loc = Localizer . forPackage ( JPAFacadeHelper . class ) ; public static OpenJPAEntityManagerFactory toEntityManagerFactory ( BrokerFactory factory ) { } public static BrokerFactory toBrokerFactory ( EntityManagerFactory emf ) { } public static OpenJPAEntityManager toEntityManager ( Broker broker ) { } public static Broker toBroker ( EntityManager em ) { if ( em == null ) return null ; if ( ! ( em instanceof EntityManagerImpl ) ) { Class c = em . getClass ( ) ; try { em = ( ( EntityManagerImpl ) ( ( ( OpenJPAEntityManager ) ( em ) ) . getUserObject ( JPAFacadeHelper . EM_KEY ) ) ) ; } catch ( ClassCastException cce ) { <START_BUG> throw new ArgumentException ( JPAFacadeHelper . _loc . get ( "cant-convert-broker" , c ) , null , null , false ) ; <END_BUG> } } return ( ( EntityManagerImpl ) ( em ) ) . getBroker ( ) ; } public static ClassMetaData getMetaData ( Object o ) { } public static ClassMetaData getMetaData ( EntityManager em , Class cls ) { } public static ClassMetaData getMetaData ( EntityManagerFactory emf , Class cls ) { } public static Object fromOpenJPAObjectId ( Object oid ) { } public static Object toOpenJPAObjectId ( ClassMetaData meta , Object oid ) { } public static Object [ ] toOpenJPAObjectIds ( ClassMetaData meta , Object ... oids ) { } public static Collection toOpenJPAObjectIds ( ClassMetaData meta , Collection oids ) { } public static Class fromOpenJPAObjectIdClass ( Class oidClass ) { } }

Fix:
throw new ArgumentException ( JPAFacadeHelper . _loc . get ( "cant-convert-broker" , c ) , new Throwable [ ] { cce } , null , false ) ;
Buggy code:
public class InitialContextFactory { private static final HashMap < String , Context > MAP = new HashMap < String , Context > ( ) ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; public static synchronized Context lookupContext ( String initialContextFactory , String providerUrl , boolean useAuth , String securityPrincipal , String securityCredentials ) { Context ctx = InitialContextFactory . MAP . get ( ( initialContextFactory + providerUrl ) ) ; if ( ctx == null ) { Properties props = new Properties ( ) ; props . setProperty ( Context . INITIAL_CONTEXT_FACTORY , initialContextFactory ) ; props . setProperty ( Context . PROVIDER_URL , providerUrl ) ; if ( ( ( ( useAuth && ( securityPrincipal != null ) ) && ( securityCredentials != null ) ) && ( ( securityPrincipal . length ( ) ) > 0 ) ) && ( ( securityCredentials . length ( ) ) > 0 ) ) { props . setProperty ( Context . SECURITY_PRINCIPAL , securityPrincipal ) ; props . setProperty ( Context . SECURITY_CREDENTIALS , securityCredentials ) ; InitialContextFactory . log . info ( "authentication<seq2seq4repair_space>properties<seq2seq4repair_space>set" ) ; } try { ctx = new InitialContext ( props ) ; <START_BUG> InitialContextFactory . log . info ( "created<seq2seq4repair_space>the<seq2seq4repair_space>JNDI<seq2seq4repair_space>initial<seq2seq4repair_space>context<seq2seq4repair_space>factory" ) ; <END_BUG> } catch ( NamingException e ) { InitialContextFactory . log . error ( ( "lookupContext::<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } if ( ctx != null ) { InitialContextFactory . MAP . put ( ( initialContextFactory + providerUrl ) , ctx ) ; } } return ctx ; } public static Topic lookupTopic ( Context ctx , String name ) { } public static synchronized void close ( ) { } }

Fix:
InitialContextFactory . log . info ( "created<seq2seq4repair_space>the<seq2seq4repair_space>JNDI<seq2seq4repair_space>initial<seq2seq4repair_space>context<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>factory" ) ;
Buggy code:
public class ArrayTransformer { private static final int ROWS_PER_DISPLAY = 12 ; private static final int ALL_ROWS = 24 ; private static final byte MIDDLE_LED_VALUE = ( ( byte ) ( 128 ) ) ; private static final byte MAX_LED_VALUE = ( ( byte ) ( 255 ) ) ; public byte [ ] [ ] GetFramesAsByteArrays ( ArrayList < List < SortStep > > collectionOfFrames ) { } private byte [ ] [ ] [ ] ConvertSingleSortVisualization ( List < SortStep > sortSteps ) { } private byte [ ] [ ] transformTwoDimensionArrayCollectionToSingleDimension ( byte [ ] [ ] [ ] frameCollection ) { } private byte [ ] transformTwoDimensionArrayToSingleDimension ( byte [ ] [ ] frame ) { } private byte [ ] [ ] [ ] combineAllScreens ( byte [ ] [ ] [ ] frameCollection1 , byte [ ] [ ] [ ] frameCollection2 , byte [ ] [ ] [ ] frameCollection3 , byte [ ] [ ] [ ] frameCollection4 ) { int length1 = Math . max ( frameCollection1 . length , frameCollection2 . length ) ; int length2 = Math . max ( frameCollection3 . length , frameCollection4 . length ) ; int numberOfFrames = Math . max ( length1 , length2 ) ; byte [ ] [ ] [ ] combinedScreens = new byte [ numberOfFrames ] [ ArrayTransformer . ALL_ROWS ] [ ArrayTransformer . ALL_ROWS ] ; <START_BUG> byte [ ] [ ] [ ] [ ] collections = new byte [ ] [ ] [ ] [ ] { frameCollection1 , frameCollection3 , frameCollection2 , frameCollection4 } ; <END_BUG> for ( int frameIndex = 0 ; frameIndex < numberOfFrames ; frameIndex ++ ) { int [ ] currentFrame = new int [ ] { frameIndex , frameIndex , frameIndex , frameIndex } ; for ( int i = 0 ; i < ( collections . length ) ; i ++ ) { if ( frameIndex >= ( collections [ i ] . length ) ) { currentFrame [ i ] = ( collections [ i ] . length ) - 1 ; } } for ( int i = 0 ; i < 2 ; i ++ ) { for ( int k = 0 ; k < 2 ; k ++ ) { for ( int j = 0 ; j < ( ArrayTransformer . ROWS_PER_DISPLAY ) ; j ++ ) { for ( int l = 0 ; l < ( ArrayTransformer . ROWS_PER_DISPLAY ) ; l ++ ) { combinedScreens [ frameIndex ] [ ( ( i * ( ArrayTransformer . ROWS_PER_DISPLAY ) ) + j ) ] [ ( ( k * ( ArrayTransformer . ROWS_PER_DISPLAY ) ) + l ) ] = collections [ ( ( i * 2 ) + k ) ] [ currentFrame [ ( ( i * 2 ) + k ) ] ] [ j ] [ l ] ; } } } } } return combinedScreens ; } }

Fix:
byte [ ] [ ] [ ] [ ] collections = new byte [ ] [ ] [ ] [ ] { frameCollection3 , frameCollection1 , frameCollection4 , frameCollection2 } ;
Buggy code:
@ Path ( "//users" ) @ Api ( value = "//users" , description = "Operations<seq2seq4repair_space>about<seq2seq4repair_space>users" , position = 3 ) public class UsersResource { @ POST @ Consumes ( MediaType . APPLICATION_JSON ) @ Produces ( MediaType . APPLICATION_JSON ) @ ApiOperation ( "Returns<seq2seq4repair_space>an<seq2seq4repair_space>array<seq2seq4repair_space>of<seq2seq4repair_space>all<seq2seq4repair_space>registered<seq2seq4repair_space>services." ) @ ApiResponses ( { @ ApiResponse ( code = 201 , message = "CREATED" ) , @ ApiResponse ( code = 404 , message = "NOT<seq2seq4repair_space>FOUND" ) } ) public Response createNewUser ( @ HeaderParam ( "X-Auth-Token" ) String xAuthToken , JsonObject userdata ) { } @ Path ( "//openIDauth" ) @ GET @ ApiOperation ( "Redirects<seq2seq4repair_space>to<seq2seq4repair_space>openID<seq2seq4repair_space>Connect<seq2seq4repair_space>Login<seq2seq4repair_space>Page." ) @ ApiResponses ( { @ ApiResponse ( code = 302 , message = "FOUND" ) } ) public Response getOpenIDLoginPage ( ) { } @ POST @ Path ( "//{uid}" ) @ ApiOperation ( "Creates<seq2seq4repair_space>User<seq2seq4repair_space>with<seq2seq4repair_space>LDAP<seq2seq4repair_space>User<seq2seq4repair_space>Data" ) @ ApiResponses ( { @ ApiResponse ( code = 201 , message = "Created" ) , @ ApiResponse ( code = 202 , message = "Accepted" ) } ) public Response createStorage ( @ PathParam ( "uid" ) String uid , @ HeaderParam ( "PW" ) String pw ) { Response r = null ; if ( ( pw != null ) && ( pw . equals ( "useanotherpw" ) ) ) { JsonObject key = OpenstackClient . adminAuth ( UserStorageResource . getSwiftCredentials ( ) ) ; <START_BUG> Status answer = OpenstackClient . createContainer ( key . get ( "X-Auth-Token" ) . getAsString ( ) , key . get ( "tenant-id" ) . getAsString ( ) , ( "user_" + ( sub ) ) ) ; <END_BUG> r = Response . status ( answer ) . build ( ) ; } return r ; } @ Path ( "//verifyAccessToken" ) @ GET @ ApiOperation ( "Method<seq2seq4repair_space>in<seq2seq4repair_space>Testing<seq2seq4repair_space>-<seq2seq4repair_space>Verify<seq2seq4repair_space>LDAP<seq2seq4repair_space>Access" ) @ ApiResponses ( { @ ApiResponse ( code = 200 , message = "OK" ) } ) public Response verifyAccessToken ( @ HeaderParam ( "Authorization" ) String accessToken ) { } No newline ; at end ; of file ; }

Fix:
Status answer = OpenstackClient . createContainer ( key . get ( "X-Auth-Token" ) . getAsString ( ) , key . get ( "tenant-id" ) . getAsString ( ) , uid ) ;
Buggy code:
public abstract class AbstractScannerPlugin < I , D extends Descriptor > implements ScannerPlugin < I , D > { private Map < String , Object > properties ; @ Override public void initialize ( Map < String , Object > properties ) { } @ Override public Class < ? extends I > getType ( ) { } protected Class < ? extends I > getType ( Class < ? > expectedSuperClass , int genericTypeParameterIndex ) { } protected void initialize ( ) { } protected Map < String , Object > getProperties ( ) { } protected String getStringProperty ( String name , String defaultValue ) { } private < T > T getProperty ( String name , Class < T > type , T defaultValue ) { <START_BUG> Object o = properties . getOrDefault ( name , defaultValue ) ; <END_BUG> if ( o == null ) { return defaultValue ; } if ( ! ( type . isAssignableFrom ( o . getClass ( ) ) ) ) { throw new IllegalArgumentException ( ( ( ( ( ( "Found<seq2seq4repair_space>value<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>" + ( o . getClass ( ) . getName ( ) ) ) + "for<seq2seq4repair_space>property<seq2seq4repair_space>" ) + name ) + ",<seq2seq4repair_space>expected<seq2seq4repair_space>" ) + ( type . getName ( ) ) ) ) ; } return type . cast ( o ) ; } protected String getDirectoryPath ( File directory , File entry ) { } }

Fix:
Object o = properties . get ( name ) ;
Buggy code:
public class Chop extends Node { @ Override public String status ( ) { } @ Override public boolean validate ( ) { } @ Override public void execute ( ) { } private void preventSpamClick ( ) { } private RSObject closestTree ( String tree , int range ) { } private void walkToTreeArea ( ) { if ( Banking . isInBank ( ) ) { for ( RSTile tile : Constants . PATH_TO_TREE_AREA ) { Walking . clickTileMM ( tile , 1 ) ; <START_BUG> General . sleep ( 2300 , 3800 ) ; <END_BUG> } } } private boolean isInTreeArea ( ) { } }

Fix:
General . sleep ( 2300 , 4800 ) ;