nus-yam/ex-repair huggingface dataset:
Buggy code:
@ TargetApi ( VERSION_CODES . FROYO ) public class InstagramSharePlugin extends CordovaPlugin { private static final FilenameFilter OLD_IMAGE_FILTER = new FilenameFilter ( ) { @ Override public boolean accept ( File dir , String name ) { } } ; CallbackContext cbContext ; @ Override public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) throws JSONException { } private void isInstalled ( ) { } private void shareImage ( String imageString , String captionString ) { } public String getRealVideoPathFromURI ( Uri contentUri ) { } public String getRealImagePathFromURI ( Uri contentUri ) { } private void shareVideo ( String videoString , String captionString ) { <START_BUG> File media = new File ( this . getRealVideoPathFromURI ( videoString ) ) ; <END_BUG> Uri uri = Uri . fromFile ( media ) ; Intent shareIntent = new Intent ( Intent . ACTION_SEND ) ; shareIntent . setType ( "video//*" ) ; shareIntent . putExtra ( EXTRA_STREAM , uri ) ; shareIntent . putExtra ( EXTRA_TEXT , captionString ) ; shareIntent . setPackage ( "com.instagram.android" ) ; this . cordova . startActivityForResult ( ( ( CordovaPlugin ) ( this ) ) , shareIntent , 12345 ) ; } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } }

Fix:
File media = new File ( this . getRealVideoPathFromURI ( Uri . parse ( videoString ) ) ) ;
Buggy code:
public class GpuFilterQuerySelector extends GpuQuerySelector { private static final Logger log = Logger . getLogger ( GpuFilterQuerySelector . class ) ; protected IntBuffer outputEventIndexBuffer ; public GpuFilterQuerySelector ( String id , Selector selector , boolean currentOn , boolean expiredOn , ExecutionPlanContext executionPlanContext , String queryName ) { } public void deserialize ( int eventCount ) { } @ Override public void process ( int eventCount ) { } public QuerySelector clone ( String key ) { <START_BUG> GpuFilterQuerySelector clonedQuerySelector = GpuSelectorParser . getGpuFilterQuerySelector ( queryName , this . gpuOutputMetaStreamEvent , ( ( id ) + key ) , selector , currentOn , expiredOn , executionPlanContext , deserializeMappings ) ; <END_BUG> if ( clonedQuerySelector == null ) { clonedQuerySelector = new GpuFilterQuerySelector ( ( ( id ) + key ) , selector , currentOn , expiredOn , executionPlanContext , queryName ) ; } List < AttributeProcessor > clonedAttributeProcessorList = new ArrayList < AttributeProcessor > ( ) ; for ( AttributeProcessor attributeProcessor : attributeProcessorList ) { clonedAttributeProcessorList . add ( attributeProcessor . cloneProcessor ( ) ) ; } clonedQuerySelector . attributeProcessorList = clonedAttributeProcessorList ; clonedQuerySelector . eventPopulator = eventPopulator ; clonedQuerySelector . outputRateLimiter = outputRateLimiter ; return clonedQuerySelector ; } @ Override public void setOutputEventBuffer ( ByteBuffer outputEventBuffer ) { } public List < GpuMetaStreamEvent . GpuEventAttribute > getDeserializeMappings ( ) { } }

Fix:
GpuFilterQuerySelector clonedQuerySelector = GpuSelectorParser . getGpuFilterQuerySelector ( queryName , this . gpuOutputMetaStreamEvent , ( ( id ) + key ) , selector , currentOn , expiredOn , executionPlanContext , deserializeMappings , gpuInputMetaStreamEvent ) ;
Buggy code:
public class XMPPChatRoomContainerHelper implements ISharedObject { ISharedObjectConfig config = null ; Vector messageListeners = new Vector ( ) ; Namespace usernamespace = null ; XMPPConnection connection = null ; Vector participantListeners = new Vector ( ) ; ID roomID = null ; protected void trace ( String message ) { } protected void addChatParticipantListener ( IChatRoomParticipantListener listener ) { } protected void removeChatParticipantListener ( IChatRoomParticipantListener listener ) { } public XMPPChatRoomContainerHelper ( Namespace usernamespace , XMPPConnection conn ) { } protected ISharedObjectContext getContext ( ) { } public void init ( ISharedObjectConfig initData ) throws SharedObjectInitException { } protected ID createUserIDFromName ( String name ) { } protected Type [ ] ALLOWED_MESSAGES = new Type [ ] { Type . GROUP_CHAT } ; protected Message filterMessageType ( Message msg ) { } protected String canonicalizeRoomFrom ( String from ) { } protected void fireMessageListeners ( ID from , String body ) { } protected String canonicalizeRoomTo ( String to ) { } protected ID createRoomIDFromName ( String from ) { } protected void handleMessageEvent ( MessageEvent evt ) { } protected Type createIPresenceType ( Presence xmppPresence ) { } protected Mode createIPresenceMode ( Presence xmppPresence ) { } protected IPresence createIPresence ( Presence xmppPresence ) { } protected void handlePresenceEvent ( PresenceEvent evt ) { } protected void handleChatMembershipEvent ( ChatMembershipEvent evt ) { } protected void fireParticipant ( ID fromID , IPresence presence ) { for ( Iterator i = participantListeners . iterator ( ) ; i . hasNext ( ) ; ) { IChatRoomParticipantListener l = ( ( IChatRoomParticipantListener ) ( i . next ( ) ) ) ; <START_BUG> l . handlePresence ( fromID , presence ) ; <END_BUG> } } protected void fireChatParticipant ( ID fromID , boolean join ) { } public void handleEvent ( Event event ) { } public void handleEvents ( Event [ ] events ) { } public void dispose ( ID containerID ) { } public Object getAdapter ( Class clazz ) { } protected void addChatRoomMessageListener ( IIMMessageListener msgListener ) { } public void removeChatRoomMessageListener ( IIMMessageListener msgListener ) { } protected void setRoomID ( ID roomID ) { } }

Fix:
l . handlePresenceUpdated ( fromID , presence ) ;
Buggy code:
public class Canopy { public static final String DISTANCE_MEASURE_KEY = "org.apache.mahout.clustering.canopy.measure" ; public static final String T1_KEY = "org.apache.mahout.clustering.canopy.t1" ; public static final String T2_KEY = "org.apache.mahout.clustering.canopy.t2" ; public static final String CANOPY_PATH_KEY = "org.apache.mahout.clustering.canopy.path" ; private static int nextCanopyId = 0 ; private static double t1 ; private static double t2 ; private static DistanceMeasure measure ; private final int canopyId ; private Vector center = new SparseVector ( 0 ) ; private int numPoints = 0 ; private Vector pointTotal = null ; public Canopy ( Vector point ) { } public Canopy ( Vector point , int canopyId ) { } public static void configure ( JobConf job ) { } public static void config ( DistanceMeasure aMeasure , double aT1 , double aT2 ) { } public static void addPointToCanopies ( Vector point , List < Canopy > canopies ) { } public static void emitPointToNewCanopies ( Vector point , List < Canopy > canopies , OutputCollector < Text , Text > collector ) throws IOException { } public static void emitPointToExistingCanopies ( Vector point , List < Canopy > canopies , Text writable , OutputCollector < Text , Text > collector ) throws IOException { } public static String formatCanopy ( Canopy canopy ) { } public static Canopy decodeCanopy ( String formattedString ) { } public void addPoint ( Vector point ) { } public void emitPoint ( Vector point , OutputCollector < Text , Text > collector ) throws IOException { <START_BUG> collector . collect ( new Text ( Canopy . formatCanopy ( this ) ) , new Text ( point . asFormatString ( ) ) ) ; <END_BUG> } @ Override public String toString ( ) { } public String getIdentifier ( ) { } public int getCanopyId ( ) { } public Vector getCenter ( ) { } public int getNumPoints ( ) { } public Vector computeCentroid ( ) { } public boolean covers ( Vector point ) { } }

Fix:
collector . collect ( new Text ( this . getIdentifier ( ) ) , new Text ( point . asFormatString ( ) ) ) ;
Buggy code:
public class BlockScope extends Scope { public LocalVariableBinding [ ] locals ; public int localIndex ; public int startIndex ; public int offset ; public int maxOffset ; public BlockScope [ ] shiftScopes ; public static final VariableBinding [ ] EmulationPathToImplicitThis = new VariableBinding [ ] { } ; public static final VariableBinding [ ] NoEnclosingInstanceInConstructorCall = new VariableBinding [ ] { } ; public static final VariableBinding [ ] NoEnclosingInstanceInStaticContext = new VariableBinding [ ] { } ; public Scope [ ] subscopes = new Scope [ 1 ] ; public int subscopeCount = 0 ; public CaseStatement enclosingCase ; protected BlockScope ( int kind , Scope parent ) { } public BlockScope ( BlockScope parent ) { } public BlockScope ( BlockScope parent , boolean addToParentScope ) { } public BlockScope ( BlockScope parent , int variableCount ) { } public final void addAnonymousType ( TypeDeclaration anonymousType , ReferenceBinding superBinding ) { } public final void addLocalType ( TypeDeclaration localType ) { } public final void addLocalVariable ( LocalVariableBinding binding ) { } public void addSubscope ( Scope childScope ) { } public final boolean allowBlankFinalFieldAssignment ( FieldBinding binding ) { <START_BUG> if ( ( enclosingSourceType ( ) ) != ( binding . declaringClass ) ) <END_BUG> return false ; MethodScope methodScope = methodScope ( ) ; if ( ( methodScope . isStatic ) != ( binding . isStatic ( ) ) ) return false ; return ( methodScope . isInsideInitializer ( ) ) || ( ( ( AbstractMethodDeclaration ) ( methodScope . referenceContext ) ) . isInitializationMethod ( ) ) ; } String basicToString ( int tab ) { } private void checkAndSetModifiersForVariable ( LocalVariableBinding varBinding ) { } void computeLocalVariablePositions ( int ilocal , int initOffset , CodeStream codeStream ) { } public void emulateOuterAccess ( LocalVariableBinding outerLocalVariable ) { } public final ReferenceBinding findLocalType ( char [ ] name ) { } public LocalVariableBinding findVariable ( char [ ] variable ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite , boolean needResolve ) { } public final Binding getBinding ( char [ ] [ ] compoundName , InvocationSite invocationSite ) { } public VariableBinding [ ] getEmulationPath ( LocalVariableBinding outerLocalVariable ) { } public Object [ ] getEmulationPath ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch , boolean denyEnclosingArgInConstructorCall ) { } public final boolean isDuplicateLocalVariable ( char [ ] name ) { } public int maxShiftedOffset ( ) { } public ProblemReporter problemReporter ( ) { } public void propagateInnerEmulation ( ReferenceBinding targetType , boolean isEnclosingInstanceSupplied ) { } public TypeDeclaration referenceType ( ) { } public int scopeIndex ( ) { } int startIndex ( ) { } public String toString ( ) { } public String toString ( int tab ) { } }

Fix:
if ( ( enclosingReceiverType ( ) ) != ( binding . declaringClass ) )
Buggy code:
public class MultiValueMapTest < K , V > extends AbstractObjectTest { public MultiValueMapTest ( final String testName ) { } public void testNoMappingReturnsNull ( ) { } @ SuppressWarnings ( "unchecked" ) public void testValueCollectionType ( ) { } @ SuppressWarnings ( "unchecked" ) public void testMultipleValues ( ) { } @ SuppressWarnings ( "unchecked" ) public void testContainsValue ( ) { } @ SuppressWarnings ( "unchecked" ) public void testKeyContainsValue ( ) { } @ SuppressWarnings ( "unchecked" ) public void testValues ( ) { } @ SuppressWarnings ( "unchecked" ) private MultiValueMap < K , V > createTestMap ( ) { } @ SuppressWarnings ( "unchecked" ) private < C extends Collection < V > > MultiValueMap < K , V > createTestMap ( final Class < C > collectionClass ) { } public void testKeyedIterator ( ) { } public void testRemoveAllViaIterator ( ) { } public void testRemoveAllViaKeyedIterator ( ) { } public void testIterator ( ) { } public void testRemoveAllViaEntryIterator ( ) { } public void testTotalSizeA ( ) { } @ SuppressWarnings ( "unchecked" ) public void testMapEquals ( ) { final MultiValueMap < K , V > one = new MultiValueMap < K , V > ( ) ; <START_BUG> final Integer value = new Integer ( 1 ) ; <END_BUG> one . put ( ( ( K ) ( "One" ) ) , value ) ; one . remove ( "One" , value ) ; final MultiValueMap < K , V > two = new MultiValueMap < K , V > ( ) ; assertEquals ( two , one ) ; } @ SuppressWarnings ( "unchecked" ) public void testGetCollection ( ) { } @ SuppressWarnings ( "unchecked" ) public void testTotalSize ( ) { } @ SuppressWarnings ( "unchecked" ) public void testSize ( ) { } @ SuppressWarnings ( "unchecked" ) public void testSize_Key ( ) { } @ SuppressWarnings ( "unchecked" ) public void testIterator_Key ( ) { } @ SuppressWarnings ( "unchecked" ) public void testContainsValue_Key ( ) { } @ SuppressWarnings ( "unchecked" ) public void testPutWithList ( ) { } @ SuppressWarnings ( "unchecked" ) public void testPutWithSet ( ) { } @ SuppressWarnings ( "unchecked" ) public void testPutAll_Map1 ( ) { } @ SuppressWarnings ( "unchecked" ) public void testPutAll_Map2 ( ) { } @ SuppressWarnings ( "unchecked" ) public void testPutAll_KeyCollection ( ) { } @ SuppressWarnings ( "unchecked" ) public void testRemove_KeyItem ( ) { } @ Override public String getCompatibilityVersion ( ) { } @ Override public Object makeObject ( ) { } private Map makeEmptyMap ( ) { } public void testEmptyMapCompatibility ( ) throws Exception { } public void testFullMapCompatibility ( ) throws Exception { } }

Fix:
final Integer value = Integer . valueOf ( 1 ) ;
Buggy code:
public class INIGenerator { private static String ini = "JSONrepo<seq2seq4repair_space>=<seq2seq4repair_space>https:////github.com//ICGC-TCGA-PanCancer//oxog-ops.git\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "JSONrepoName<seq2seq4repair_space>=<seq2seq4repair_space>oxog-ops\n" + "JSONfolderName<seq2seq4repair_space>=<seq2seq4repair_space>oxog-collab-jobs-test\n" ) + "JSONlocation<seq2seq4repair_space>=<seq2seq4repair_space>//home//seqware//gitroot//\n" ) + "GITemail<seq2seq4repair_space>=<seq2seq4repair_space>denis.yuen+icgc@gmail.com\n" ) + "GITname<seq2seq4repair_space>=<seq2seq4repair_space>icgc-bot\n" ) + "GITPemFile<seq2seq4repair_space>=<seq2seq4repair_space>//home//ubuntu//.gnos//git.pem\n" ) + "uploadURL<seq2seq4repair_space>=<seq2seq4repair_space>oicr@192.170.233.206:~//incoming//bulk_upload//\n" ) + "downloadMethod<seq2seq4repair_space>=<seq2seq4repair_space>icgcStorageClient\n" ) + "uploadKey<seq2seq4repair_space>=<seq2seq4repair_space>//datastore//credentials//rsync.key\n" ) + "gnosKey<seq2seq4repair_space>=<seq2seq4repair_space>//datastore//credentials//gnos.key\n" ) + "collabToken<seq2seq4repair_space>=<seq2seq4repair_space>//datastore//credentials//collab.token\n" ) + "skipDownload<seq2seq4repair_space>=<seq2seq4repair_space>false\n" ) + "skipOxoG<seq2seq4repair_space>=<seq2seq4repair_space>false\n" ) + "skipVariantBam<seq2seq4repair_space>=<seq2seq4repair_space>false\n" ) + "skipAnnotation<seq2seq4repair_space>=<seq2seq4repair_space>false\n" ) + "skipUpload<seq2seq4repair_space>=<seq2seq4repair_space>false\n\n" ) ; private static Map < String , Object > getDataFromJSON ( String pathToJSON ) { } private static String mapToINI ( Map < String , Object > m , String prefix ) { } public static void main ( String [ ] args ) throws Exception { if ( ( args . length ) > 0 ) { Map < String , Object > fromJSON = INIGenerator . getDataFromJSON ( args [ 0 ] ) ; StringBuilder sb = new StringBuilder ( ) ; String iniFromJSON = INIGenerator . mapToINI ( fromJSON , "" ) ; sb . append ( INIGenerator . ini ) ; String donorID = ( ( String ) ( fromJSON . get ( SUBMITTER_DONOR_ID ) ) ) ; String projectCode = ( ( String ) ( fromJSON . get ( PROJECT_CODE ) ) ) ; <START_BUG> sb . append ( ( ( ( ( "JSONfileName<seq2seq4repair_space>=<seq2seq4repair_space>" + projectCode ) + "." ) + donorID ) + ".json" ) ) ; <END_BUG> sb . append ( iniFromJSON ) ; Files . write ( Paths . get ( ( ( ".//" + donorID ) + ".INI" ) ) , sb . toString ( ) . getBytes ( ) ) ; System . out . println ( ( ( ( "Writing<seq2seq4repair_space>file:<seq2seq4repair_space>" + ".//" ) + donorID ) + ".INI" ) ) ; } else { throw new Exception ( "You<seq2seq4repair_space>must<seq2seq4repair_space>pass<seq2seq4repair_space>the<seq2seq4repair_space>path<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>JSON<seq2seq4repair_space>file<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>only<seq2seq4repair_space>argument<seq2seq4repair_space>to<seq2seq4repair_space>this<seq2seq4repair_space>program." ) ; } } }

Fix:
sb . append ( ( ( ( ( "JSONfileName<seq2seq4repair_space>=<seq2seq4repair_space>" + projectCode ) + "." ) + donorID ) + ".json\n\n" ) ) ;
Buggy code:
class CSVLexer1306667 extends Lexer { public CSVLexer1306667 ( final CSVFormat format , final ExtendedBufferedReader in ) { } @ Override Token nextToken ( final Token tkn ) throws IOException { } private Token simpleTokenLexer ( final Token tkn , int c ) throws IOException { } private Token encapsulatedTokenLexer ( final Token tkn ) throws IOException { <START_BUG> final int startLineNumber = getLineNumber ( ) ; <END_BUG> int c ; while ( true ) { c = in . read ( ) ; if ( isEscape ( c ) ) { tkn . content . append ( ( ( char ) ( readEscape ( ) ) ) ) ; } else if ( isEncapsulator ( c ) ) { if ( isEncapsulator ( in . lookAhead ( ) ) ) { c = in . read ( ) ; tkn . content . append ( ( ( char ) ( c ) ) ) ; } else { while ( true ) { c = in . read ( ) ; if ( isDelimiter ( c ) ) { tkn . type = Type . TOKEN ; return tkn ; } else if ( isEndOfFile ( c ) ) { tkn . type = Type . EOF ; tkn . isReady = true ; return tkn ; } else if ( isEndOfLine ( c ) ) { tkn . type = Type . EORECORD ; return tkn ; } else if ( ! ( isWhitespace ( c ) ) ) { throw new IOException ( ( ( "(line<seq2seq4repair_space>" + ( getLineNumber ( ) ) ) + ")<seq2seq4repair_space>invalid<seq2seq4repair_space>char<seq2seq4repair_space>between<seq2seq4repair_space>encapsulated<seq2seq4repair_space>token<seq2seq4repair_space>and<seq2seq4repair_space>delimiter" ) ) ; } } } } else if ( isEndOfFile ( c ) ) { throw new IOException ( ( ( "(startline<seq2seq4repair_space>" + startLineNumber ) + ")<seq2seq4repair_space>EOF<seq2seq4repair_space>reached<seq2seq4repair_space>before<seq2seq4repair_space>encapsulated<seq2seq4repair_space>token<seq2seq4repair_space>finished" ) ) ; } else { tkn . content . append ( ( ( char ) ( c ) ) ) ; } } } }

Fix:
final long startLineNumber = getLineNumber ( ) ;
Buggy code:
@ Controller @ RequestMapping ( "//dashboard" ) public class CtrlDashBoard { @ Autowired private IComputerService computerService ; private static final String OFFSET = "offset" ; private static final String INDEX = "index" ; private static final String SEARCH = "search" ; private static final String SORT = "sort" ; public CtrlDashBoard ( ) { } @ RequestMapping ( method = RequestMethod . GET ) public String displayComputers ( ModelMap model , @ RequestParam ( value = CtrlDashBoard . SEARCH , required = false ) String search , @ RequestParam ( value = CtrlDashBoard . INDEX , required = false ) String index , @ RequestParam ( value = CtrlDashBoard . OFFSET , required = false ) String offset , @ RequestParam ( value = CtrlDashBoard . SORT , required = false ) String sort ) { } @ RequestMapping ( method = RequestMethod . POST ) protected String deleteComputers ( ModelMap model , @ RequestParam ( value = "selection" , required = false ) String selection ) { String [ ] checkedComputersId = null ; if ( selection != null ) { if ( ( selection . length ( ) ) > 0 ) { checkedComputersId = selection . split ( "," ) ; } for ( String checkedId : checkedComputersId ) { computerService . delete ( Integer . parseInt ( checkedId ) ) ; } } Page page = new Page ( ) ; <START_BUG> List < ComputerDTO > computersDTO = MapperDTO . computersToDTO ( computerService . findAll ( ) ) ; <END_BUG> model . addAttribute ( "computersDTO" , computersDTO ) ; model . addAttribute ( "page" , page ) ; model . addAttribute ( "computersFound" , computerService . count ( "" ) ) ; return "dashboard" ; } }

Fix:
List < ComputerDTO > computersDTO = MapperDTO . computersToDTO ( computerService . search ( "" , 1 , 10 , "" ) ) ;
Buggy code:
public class Student { private Long id ; private String studentid ; private String name ; private String email ; public Long getId ( ) { } public void setId ( Long id ) { } public String getName ( ) { } public void setName ( String name ) { } public String getEmail ( ) { } public void setEmail ( String email ) { } public String getStudentid ( ) { } public void setStudentid ( String studentid ) { } @ Override public String toString ( ) { <START_BUG> String s = ( ( "" + ( this . name ) ) + "<seq2seq4repair_space>" ) + ( this . id ) ; <END_BUG> return s ; } }

Fix:
String s = ( ( "" + ( this . id ) ) + "<seq2seq4repair_space>" ) + ( this . studentid ) ;
Buggy code:
public class VersionedMarshallingConfigurationService implements VersionedMarshallingConfiguration , Service < VersionedMarshallingConfiguration > { public static ServiceName getServiceName ( ServiceName deploymentUnitServiceName ) { <START_BUG> return deploymentUnitServiceName . append ( "marshalling" ) ; <END_BUG> } private static final int CURRENT_VERSION = 1 ; private final Map < Integer , MarshallingConfiguration > configurations = new HashMap < > ( ) ; private final Value < ModuleDeployment > deployment ; private final Value < ModuleLoader > loader ; public VersionedMarshallingConfigurationService ( Value < ModuleDeployment > deployment , Value < ModuleLoader > loader ) { } @ Override public void start ( StartContext context ) { } @ Override public void stop ( StopContext context ) { } @ Override public VersionedMarshallingConfiguration getValue ( ) { } @ Override public int getCurrentMarshallingVersion ( ) { } @ Override public MarshallingConfiguration getMarshallingConfiguration ( int version ) { } }

Fix:
return deploymentUnitServiceName . append ( "marshalling-configuration" ) ;
Buggy code:
final class SingleValueExtractor < T > extends AbstractParamValueExtractor < T > implements MultivaluedParameterExtractor < T > { public SingleValueExtractor ( ParamConverter < T > converter , String parameterName , String defaultStringValue ) { } @ Override public T extract ( MultivaluedMap < String , String > parameters ) { String v = parameters . getFirst ( SingleValueExtractor . getName ( ) ) ; try { <START_BUG> return SingleValueExtractor . fromString ( v ) ; <END_BUG> } catch ( WebApplicationException ex ) { throw ex ; } catch ( ProcessingException ex ) { throw ex ; } catch ( IllegalArgumentException ex ) { return SingleValueExtractor . defaultValue ( ) ; } catch ( Exception ex ) { throw new ExtractorException ( ex ) ; } } }

Fix:
return fromString ( ( ( v == null ) && ( SingleValueExtractor . isDefaultValueRegistered ( ) ) ? SingleValueExtractor . getDefaultValueString ( ) : v ) ) ;
Buggy code:
public class Visualizer extends Applet { private SimpleUniverse u ; private BranchGroup scene ; private TransformGroup transscene ; private final float [ ] appStart = new float [ ] { - 1.0F , - 1.0F , - 1.0F } ; private final float [ ] appEnd = new float [ ] { 1.0F , 1.0F , 1.0F } ; private final float [ ] leapStart = new float [ ] { - 300.0F , 0.0F , - 300.0F } ; private final float [ ] leapEnd = new float [ ] { 300.0F , 600.0F , 300.0F } ; private TransformGroup [ ] [ ] fingers = new TransformGroup [ 2 ] [ 5 ] ; private TransformGroup [ ] palms = new TransformGroup [ 2 ] ; public Visualizer ( ) { } public BranchGroup createSceneGraph ( ) { } public void addSphere ( Vector lmcoordinate , String type ) { } public void addSphere ( Vector3d coordinate , float size ) { } public void addSphere ( Vector3f coordinate , float size ) { } public void moveSphere ( Vector coordinate , TransformGroup tg ) { } public void moveSphere ( TransformGroup tg ) { } public void clear ( ) { } public void traceLM1 ( Frame frame ) { } public void traceLM ( Frame frame ) { } public double [ ] rangeConvert ( float [ ] LeapValue ) { double [ ] temp = new double [ 3 ] ; for ( int i = 0 ; i < 3 ; i ++ ) { temp [ i ] = ( ( ( ( LeapValue [ i ] ) - ( leapStart [ i ] ) ) * 2.0F ) // ( ( leapEnd [ i ] ) - ( leapStart [ i ] ) ) ) + ( appStart [ i ] ) ; if ( ( temp [ i ] ) > ( appEnd [ i ] ) ) { temp [ i ] = appEnd [ i ] ; } else if ( ( temp [ i ] ) < ( appStart [ i ] ) ) { temp [ i ] = appStart [ i ] ; } } <START_BUG> double [ ] appValue = new double [ ] { temp [ 0 ] , temp [ 2 ] , temp [ 1 ] } ; <END_BUG> return appValue ; } public static void main ( String [ ] args ) { } }

Fix:
double [ ] appValue = new double [ ] { temp [ 0 ] , - ( temp [ 2 ] ) , temp [ 1 ] } ;
Buggy code:
public class XaDataSourcePropertyAdd extends AbstractAddStepHandler implements DescriptionProvider { public static final XaDataSourcePropertyAdd INSTANCE = new XaDataSourcePropertyAdd ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode modelNode ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode recoveryEnvModel , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > serviceControllers ) throws OperationFailedException { <START_BUG> final String configPropertyValue = Constants . XADATASOURCE_PROPERTY_VALUE . validateResolvedOperation ( recoveryEnvModel ) . asString ( ) ; <END_BUG> final ModelNode address = operation . require ( OP_ADDR ) ; PathAddress path = PathAddress . pathAddress ( address ) ; final String jndiName = path . getElement ( ( ( path . size ( ) ) - 2 ) ) . getValue ( ) ; final String configPropertyName = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; ServiceName serviceName = SERVICE_NAME_BASE . append ( jndiName ) . append ( configPropertyName ) ; ServiceName xadsServiceName = SERVICE_NAME_BASE . append ( jndiName ) ; final ServiceRegistry registry = context . getServiceRegistry ( true ) ; final ServiceName dataSourceConfigServiceName = SERVICE_NAME_BASE . append ( jndiName ) ; final ServiceController < ? > dataSourceConfigController = registry . getService ( dataSourceConfigServiceName ) ; if ( ( dataSourceConfigController != null ) && ( ! ( ( ( org . jboss . jca . common . api . metadata . ds . XaDataSource ) ( dataSourceConfigController . getValue ( ) ) ) . isEnabled ( ) ) ) ) { final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final XaDataSourcePropertiesService service = new XaDataSourcePropertiesService ( configPropertyName , configPropertyValue ) ; serviceTarget . addService ( serviceName , service ) . setInitialMode ( ACTIVE ) . addDependency ( xadsServiceName , ModifiableXaDataSource . class , service . getXADSInjector ( ) ) . addListener ( verificationHandler ) . install ( ) ; context . addStep ( verificationHandler , VERIFY ) ; } else { context . reloadRequired ( ) ; } } }

Fix:
final String configPropertyValue = Constants . XADATASOURCE_PROPERTY_VALUE . resolveModelAttribute ( context , recoveryEnvModel ) . asString ( ) ;
Buggy code:
public class Ex1 { public static void main ( String [ ] args ) throws ClassNotFoundException , SQLException { Class . forName ( "org.postgresql.Driver" ) ; <START_BUG> Connection connection = DriverManager . getConnection ( "jdbc:postgresql:////localhost//postgres" , "postgres" , "newPassword" ) ; <END_BUG> } }

Fix:
Connection connection = DriverManager . getConnection ( "jdbc:postgresql:////localhost:5432//Univer" , "postgres" , "newPassword" ) ;
Buggy code:
class BusServiceImpl extends LifeCycle implements BusService { private static final Logger LOG = Logger . getLogger ( BusServiceImpl . class . getName ( ) ) ; private BusBroker brokerHolder ; private BusConnection connectionHolder ; private DestinationRegistry destination ; private Session receiveSession ; private Session sendSession ; private Session unlistenedSession ; protected MessageProducer messageProducer ; @ Inject public BusServiceImpl ( ) { } @ Override protected void start ( ) throws Exception { } private MessageProducer createMessageProducer ( ) throws JMSException { } protected void stop ( ) throws Exception { } @ Override public void destroy ( ) { } @ Override public void init ( ) { } private void closeSession ( final Session session ) throws Exception { } private Session createSession ( ) throws Exception { } private MessageProducer getMessageProducer ( ) { } @ Override public BusDestination registerCommandQueue ( String queueName ) throws JMSException { } @ Override public BusDestination registerEventQueue ( String queueName ) throws JMSException { } @ Override public BusDestination registerTopic ( String queueName ) throws JMSException { } @ Override public Session getReceiveSession ( ) { } @ Override public Session getSendSession ( ) { } @ Override public Session getUnlistenedSession ( ) { } private ObjectMessage createObjectMessage ( ) throws JMSException { } @ Override public void reply ( Command command , Destination destination , String correlationID ) { if ( destination == null ) { throw new IllegalArgumentException ( ( ( ( ( ( ( "Null<seq2seq4repair_space>reply<seq2seq4repair_space>destination<seq2seq4repair_space>" + "for<seq2seq4repair_space>command<seq2seq4repair_space>" ) + ( command . getName ( ) ) ) + "<seq2seq4repair_space>" ) + "(reply<seq2seq4repair_space>timeout:<seq2seq4repair_space>" ) + ( command . getReplyTimeout ( ) ) ) + ")" ) ) ; } try { ObjectMessage msg = createObjectMessage ( ) ; msg . setObject ( command ) ; msg . setJMSDestination ( destination ) ; msg . setJMSCorrelationID ( correlationID ) ; msg . setStringProperty ( "provenance" , INSTANCE_ID ) ; BusServiceImpl . LOG . log ( Level . CONFIG , "Sending<seq2seq4repair_space>reply<seq2seq4repair_space>to<seq2seq4repair_space>command<seq2seq4repair_space>''{0}''<seq2seq4repair_space>on<seq2seq4repair_space>{1}" , new Object [ ] { command . getName ( ) , msg . getJMSDestination ( ) } ) ; <START_BUG> getMessageProducer ( ) . send ( msg ) ; <END_BUG> Profiler . incrementSentReplies ( ) ; } catch ( JMSException jmse ) { BusServiceImpl . LOG . severe ( Freedomotic . getStackTraceInfo ( jmse ) ) ; } } @ Override public Command send ( final Command command ) { } private Command sendAndForget ( final Command command , Queue currDestination , ObjectMessage msg ) throws JMSException { } private Command sendAndWaitReply ( final Command command , Queue currDestination , ObjectMessage msg ) throws JMSException { } @ Override public void send ( EventTemplate ev ) { } @ Override public void send ( final EventTemplate ev , final String to ) { } }

Fix:
getMessageProducer ( ) . send ( destination , msg ) ;
Buggy code:
@ WebListener public class TestDataCreator implements ServletContextListener { public TestDataCreator ( ) { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public void contextInitialized ( ServletContextEvent arg0 ) { Map param = new HashMap ( ) ; param . put ( "name" , "劉威雄" ) ; param . put ( "email" , "email" ) ; param . put ( "topic" , "叼你" ) ; <START_BUG> param . put ( "content" , "叼你" ) ; <END_BUG> Transaction transaction = new CreateMessageTransaction ( ) ; try { for ( int i = 0 ; i < 10 ; i ++ ) transaction . execute ( param ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } param . clear ( ) ; param . put ( "title" , "fuck" ) ; param . put ( "imageLinks" , new ArrayList < String > ( ) ) ; List < Map > paragraphParams = new ArrayList < > ( ) ; Map paragraphParam = new HashMap ( ) ; paragraphParam . put ( "isImportant" , "false" ) ; paragraphParam . put ( "content" , "叼你" ) ; paragraphParams . add ( paragraphParam ) ; paragraphParams . add ( paragraphParam ) ; List < String > imageLinks = new ArrayList < > ( ) ; imageLinks . add ( "create_news.png" ) ; imageLinks . add ( "create_news.png" ) ; imageLinks . add ( "create_news.png" ) ; param . put ( "imageLinks" , imageLinks ) ; param . put ( "paragraphParams" , paragraphParams ) ; transaction = new CreateNewsTransaction ( ) ; try { for ( int i = 0 ; i < 10 ; i ++ ) transaction . execute ( param ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } public void contextDestroyed ( ServletContextEvent arg0 ) { } }

Fix:
param . put ( "message" , "叼你" ) ;
Buggy code:
public class TestOpenBitSet extends BaseDocIdSetTestCase < OpenBitSet > { @ Override public OpenBitSet copyOf ( BitSet bs , int length ) throws IOException { } void doGet ( BitSet a , OpenBitSet b ) { } void doGetFast ( BitSet a , OpenBitSet b , int max ) { } void doNextSetBit ( BitSet a , OpenBitSet b ) { } void doNextSetBitLong ( BitSet a , OpenBitSet b ) { } void doPrevSetBit ( BitSet a , OpenBitSet b ) { } void doPrevSetBitLong ( BitSet a , OpenBitSet b ) { } void doIterate ( BitSet a , OpenBitSet b , int mode ) { } void doIterate1 ( BitSet a , OpenBitSet b ) { } void doIterate2 ( BitSet a , OpenBitSet b ) { } void doRandomSets ( int maxSize , int iter , int mode ) { } public void testSmall ( ) { } public void testEquals ( ) { } public void testHashCodeEquals ( ) { } private OpenBitSet makeOpenBitSet ( int [ ] a ) { } private BitSet makeBitSet ( int [ ] a ) { } private void checkPrevSetBitArray ( int [ ] a ) { } public void testPrevSetBit ( ) { } public void testEnsureCapacity ( ) { OpenBitSet bits = new OpenBitSet ( 1 ) ; int bit = ( random ( ) . nextInt ( 100 ) ) + 10 ; bits . ensureCapacity ( bit ) ; bits . fastSet ( bit ) ; assertTrue ( bits . fastGet ( bit ) ) ; bits . ensureCapacity ( ( bit + 1 ) ) ; bits . fastSet ( ( bit + 1 ) ) ; assertTrue ( bits . fastGet ( ( bit + 1 ) ) ) ; bits . ensureCapacity ( 3 ) ; bits . fastSet ( 3 ) ; assertTrue ( bits . fastGet ( 3 ) ) ; bits . fastSet ( ( bit - 1 ) ) ; assertTrue ( bits . fastGet ( ( bit - 1 ) ) ) ; int numWords = ( random ( ) . nextInt ( 10 ) ) + 2 ; bits . ensureCapacityWords ( numWords ) ; <START_BUG> bit = _TestUtil . nextInt ( random ( ) , 128 , ( numWords << 6 ) ) ; <END_BUG> bits . fastSet ( bit ) ; assertTrue ( bits . fastGet ( bit ) ) ; bits . fastClear ( bit ) ; assertFalse ( bits . fastGet ( bit ) ) ; bits . fastFlip ( bit ) ; assertTrue ( bits . fastGet ( bit ) ) ; bits . ensureCapacityWords ( 2 ) ; bits . fastSet ( 3 ) ; assertTrue ( bits . fastGet ( 3 ) ) ; bits . fastSet ( ( bit - 1 ) ) ; assertTrue ( bits . fastGet ( ( bit - 1 ) ) ) ; } }

Fix:
bit = _TestUtil . nextInt ( random ( ) , 127 , ( ( numWords << 6 ) - 1 ) ) ;
Buggy code:
public class WebModule extends JerseyServletModule { private static final Logger logger = LoggerFactory . getLogger ( WebModule . class ) ; @ Override protected void configureServlets ( ) { } private void setUpJackson ( ) { } private Map < String , String > getJerseyParams ( ) { } @ Provides @ Singleton @ Named ( "gcm.api.key" ) String provideGcmApiKey ( ) { <START_BUG> File file = new File ( "WEB-INF//gcm.api.key" ) ; <END_BUG> try { FileReader fr = new FileReader ( file ) ; String result = IOUtils . toString ( fr ) . trim ( ) ; if ( result . isEmpty ( ) ) { throw new RuntimeException ( ( "File<seq2seq4repair_space>is<seq2seq4repair_space>empty:<seq2seq4repair_space>" + ( file . getAbsolutePath ( ) ) ) ) ; } return result ; } catch ( FileNotFoundException e ) { throw new RuntimeException ( ( ( ( ( "File<seq2seq4repair_space>" + ( file . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found.<seq2seq4repair_space>" ) + "Put<seq2seq4repair_space>there<seq2seq4repair_space>Google<seq2seq4repair_space>Cloud<seq2seq4repair_space>Messaging<seq2seq4repair_space>API<seq2seq4repair_space>key<seq2seq4repair_space>obtained<seq2seq4repair_space>as<seq2seq4repair_space>described<seq2seq4repair_space>here<seq2seq4repair_space>" ) + "http:////developer.android.com//google//gcm//gs.html" ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } }

Fix:
File file = new File ( "WEB-INF//secret//gcm.api.key" ) ;
Buggy code:
class ReflectiveConstructorExecutor implements ConstructorExecutor { private final Constructor < ? > ctor ; private final Integer varargsPosition ; private final int [ ] argsRequiringConversion ; public ReflectiveConstructorExecutor ( Constructor < ? > ctor , int [ ] argsRequiringConversion ) { } public TypedValue execute ( EvaluationContext context , Object ... arguments ) throws AccessException { try { <START_BUG> if ( ( ( this . argsRequiringConversion ) != null ) && ( arguments != null ) ) { <END_BUG> ReflectionHelper . convertArguments ( context . getTypeConverter ( ) , arguments , this . ctor , this . argsRequiringConversion , this . varargsPosition ) ; } if ( this . ctor . isVarArgs ( ) ) { arguments = ReflectionHelper . setupArgumentsForVarargsInvocation ( this . ctor . getParameterTypes ( ) , arguments ) ; } ReflectionUtils . makeAccessible ( this . ctor ) ; return new TypedValue ( this . ctor . newInstance ( arguments ) ) ; } catch ( Exception ex ) { throw new AccessException ( ( "Problem<seq2seq4repair_space>invoking<seq2seq4repair_space>constructor:<seq2seq4repair_space>" + ( this . ctor ) ) , ex ) ; } } }

Fix:
if ( arguments != null ) {
Buggy code:
abstract class AbstractChoice < M , E > extends FormComponent < M > { private IModel < List < E > > choices ; private IChoiceRenderer < E > renderer ; public AbstractChoice ( MarkupContainer parent , final String id ) { } public AbstractChoice ( MarkupContainer parent , final String id , final List < E > choices ) { } public AbstractChoice ( MarkupContainer parent , final String id , final List < E > choices , final IChoiceRenderer < E > renderer ) { } public AbstractChoice ( MarkupContainer parent , final String id , IModel < M > model , final List < E > choices ) { } public AbstractChoice ( MarkupContainer parent , final String id , IModel < M > model , final List < E > choices , final IChoiceRenderer < E > renderer ) { } public AbstractChoice ( MarkupContainer parent , final String id , final IModel < List < E > > choices ) { } public AbstractChoice ( MarkupContainer parent , final String id , final IModel < List < E > > choices , final IChoiceRenderer < E > renderer ) { } public AbstractChoice ( MarkupContainer parent , final String id , IModel < M > model , final IModel < List < E > > choices ) { } public AbstractChoice ( MarkupContainer parent , final String id , IModel < M > model , final IModel < List < E > > choices , final IChoiceRenderer < E > renderer ) { } public List < E > getChoices ( ) { <START_BUG> List < E > choices = this . choices . getObject ( this ) ; <END_BUG> if ( choices == null ) { throw new NullPointerException ( "List<seq2seq4repair_space>of<seq2seq4repair_space>choices<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>-<seq2seq4repair_space>Was<seq2seq4repair_space>the<seq2seq4repair_space>supplied<seq2seq4repair_space>'Choices'<seq2seq4repair_space>model<seq2seq4repair_space>empty?" ) ; } return choices ; } public final void setChoices ( IModel < List < E > > choices ) { } public final void setChoices ( List < E > choices ) { } public final IChoiceRenderer < E > getChoiceRenderer ( ) { } public final void setChoiceRenderer ( IChoiceRenderer < E > renderer ) { } @ Override protected void detachModel ( ) { } protected CharSequence getDefaultChoice ( final Object selected ) { } protected abstract boolean isSelected ( final E object , int index , String selected ) { } @ Override protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected void appendOptionHtml ( AppendingStringBuffer buffer , E choice , int index , String selected ) { } @ Override protected boolean supportsPersistence ( ) { } protected boolean localizeDisplayValues ( ) { } private class ChoicesListChange extends Change { private static final long serialVersionUID = 1L ; private final IModel < List < E > > oldChoices ; public ChoicesListChange ( ) { } @ Override public void undo ( ) { } @ Override public String toString ( ) { } } }

Fix:
List < E > choices = this . choices . getObject ( ) ;
Buggy code:
@ Path ( "//diagnose//" ) public class DiagnoseHandler { protected static Logger logger = Logger . getLogger ( "eu.neq.mais.request" ) ; private Connector connector ; @ GET @ Path ( "//one" ) @ Produces ( MediaType . APPLICATION_JSON ) public String returnDiagnose ( @ QueryParam ( "session" ) String session , @ QueryParam ( "id" ) String id ) { String diagnose = "false" ; try { connector = ConnectorFactory . getConnector ( SessionStore . getBackendSid ( session ) ) ; <START_BUG> diagnose = connector . returnDiagnose ( session , id ) ; <END_BUG> } catch ( Exception e ) { e . printStackTrace ( ) ; diagnose = "false" ; } DiagnoseHandler . logger . info ( ( "return<seq2seq4repair_space>diagnose<seq2seq4repair_space>method<seq2seq4repair_space>returned<seq2seq4repair_space>json<seq2seq4repair_space>object:<seq2seq4repair_space>" + diagnose ) ) ; return diagnose ; } }

Fix:
diagnose = connector . returnDiagnose ( id ) ;
Buggy code:
public class SimpleRefResolver < K , V extends AbstractModelElement < V > > implements RefResolver < K , V > { private static final long serialVersionUID = 2911907294132597243L ; private final Map < K , V > map ; public SimpleRefResolver ( Map < K , V > map ) { } @ Override public V resolveRef ( K ref ) { if ( ref == null ) throw new IllegalArgumentException ( "ref<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; synchronized ( map ) { <START_BUG> return null ; <END_BUG> } } }

Fix:
return map . get ( ref ) ;
Buggy code:
public class RemoteOutboundConnectionService extends AbstractOutboundConnectionService < RemoteOutboundConnectionService > { public static final ServiceName REMOTE_OUTBOUND_CONNECTION_BASE_SERVICE_NAME = SUBSYSTEM_ENDPOINT . append ( "remote-outbound-connection" ) ; private static final String REMOTE_URI_SCHEME = "remote:////" ; private final InjectedValue < OutboundSocketBinding > destinationOutboundSocketBindingInjectedValue = new InjectedValue < OutboundSocketBinding > ( ) ; private URI connectionURI ; public RemoteOutboundConnectionService ( final String connectionName , final OptionMap connectionCreationOptions ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public IoFuture < Connection > connect ( ) throws IOException { final URI uri ; try { uri = this . getConnectionURI ( ) ; } catch ( URISyntaxException e ) { throw new RuntimeException ( e ) ; } final Endpoint endpoint = this . endpointInjectedValue . getValue ( ) ; <START_BUG> return endpoint . connect ( uri , this . connectionCreationOptions ) ; <END_BUG> } Injector < OutboundSocketBinding > getDestinationOutboundSocketBindingInjector ( ) { } private synchronized URI getConnectionURI ( ) throws IOException , URISyntaxException { } @ Override public RemoteOutboundConnectionService getValue ( ) throws IllegalArgumentException , IllegalStateException { } }

Fix:
return endpoint . connect ( uri , this . connectionCreationOptions , getCallbackHandler ( ) ) ;
Buggy code:
public class DispatchActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; if ( ( ParseUser . getCurrentUser ( ) ) != null ) { ParseUser . getCurrentUser ( ) . fetchInBackground ( new com . parse . GetCallback < ParseObject > ( ) { public void done ( ParseObject object , ParseException e ) { ParseUser currUser = ( ( ParseUser ) ( object ) ) ; if ( currUser != null ) { try { ParseInstallation installation = ParseInstallation . getCurrentInstallation ( ) . fetch ( ) ; String id = installation . getInstallationId ( ) ; <START_BUG> currUser . put ( "installation_Id" , id ) ; <END_BUG> currUser . save ( ) ; } catch ( ParseException k ) { } Log . d ( "F8Debug" , ( "onCreate,<seq2seq4repair_space>got<seq2seq4repair_space>user,<seq2seq4repair_space>" + ( ParseUser . getCurrentUser ( ) . getUsername ( ) ) ) ) ; startActivity ( new android . content . Intent ( getApplicationContext ( ) , MainActivity . class ) ) ; } else { Log . d ( "F8Debug" , "onCreate,<seq2seq4repair_space>no<seq2seq4repair_space>user" ) ; startActivity ( new android . content . Intent ( getApplicationContext ( ) , SignInActivity . class ) ) ; } } } ) ; } else { startActivity ( new android . content . Intent ( getApplicationContext ( ) , SignInActivity . class ) ) ; } finish ( ) ; } No newline ; at end ; of file ; }

Fix:
currUser . put ( "installation_id" , id ) ;
Buggy code:
public class AvroSchemaGenerator extends Generator { public static final String AVRO_SCHEMA = "Avro-Schema" ; private AvroNamer namer ; private AvroDatatypeMapper datatypeMapper = new SimpleAvroDatatypeMapper ( ) ; public AvroSchemaGenerator ( AvroNamer namer , NamespaceManager nsManager ) { } public void generateAll ( Graph graph , ResourceManager resourceManager ) throws IOException { } public ResourceFile generateSchema ( Vertex shape ) throws IOException { } private String doGenerateSchema ( URI uri , Vertex shape , JsonGenerator json ) throws IOException { } private void generateFields ( String recordName , Vertex shapeVertex , JsonGenerator json ) throws IOException { Shape shape = new Shape ( ) ; Value scopeClass = shapeVertex . getValue ( scopeClass ) ; if ( scopeClass instanceof URI ) { shape . setScopeClass ( ( ( URI ) ( scopeClass ) ) ) ; } <START_BUG> List < Vertex > propertyList = shapeVertex . asTraversal ( ) . out ( property ) . toVertexList ( ) ; <END_BUG> boolean fieldStart = false ; for ( Vertex p : propertyList ) { if ( ! fieldStart ) { json . writeArrayFieldStart ( "fields" ) ; fieldStart = true ; } writeField ( shape , recordName , p , json ) ; } if ( fieldStart ) { json . writeEndArray ( ) ; } } private void writeField ( Shape shape , String recordName , Vertex propertyVertex , JsonGenerator json ) throws IOException { } private void writeType ( String recordName , Vertex propertyVertex , PropertyConstraint property , JsonGenerator json ) throws IOException { } private PropertyConstraint asPropertyConstraint ( Shape shape , Vertex propertyVertex ) { } private void addKnownValues ( Shape shape , Vertex propertyVertex , PropertyConstraint p ) { } private String description ( Vertex propertyVertex , URI predicate ) { } private List < Value > allowedValues ( Vertex propertyVertex ) { } private URI uri ( Vertex propertyVertex , URI predicate ) { } private Integer intValue ( Vertex propertyVertex , URI predicate ) { } private Value value ( Vertex v , URI predicate ) { } }

Fix:
List < Vertex > propertyList = shapeVertex . asTraversal ( ) . out ( property ) . distinct ( ) . toVertexList ( ) ;
Buggy code:
public abstract class SSLManager { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String SSL_TRUST_STORE = "javax.net.ssl.trustStore" ; private static final String KEY_STORE_PASSWORD = "javax.net.ssl.keyStorePassword" ; public static final String JAVAX_NET_SSL_KEY_STORE = "javax.net.ssl.keyStore" ; private static final String PKCS12 = "pkcs12" ; private static SSLManager manager ; private static boolean isSSLSupported = true ; private static Provider sslProvider = null ; private JmeterKeyStore keyStore ; private KeyStore trustStore = null ; private volatile boolean truststore_loaded = false ; protected String defaultpw = System . getProperty ( SSLManager . KEY_STORE_PASSWORD ) ; public static void reset ( ) { } public abstract void setContext ( HttpURLConnection conn ) { } protected void setProvider ( Provider provider ) { } protected JmeterKeyStore getKeyStore ( ) { } private String getPassword ( ) { } protected KeyStore getTrustStore ( ) { } protected SSLManager ( ) { } public static final SSLManager getInstance ( ) { if ( null == ( SSLManager . manager ) ) { <START_BUG> return new JsseSSLManager ( SSLManager . sslProvider ) ; <END_BUG> } return SSLManager . manager ; } public static final boolean isSSLSupported ( ) { } }

Fix:
SSLManager . manager = new JsseSSLManager ( SSLManager . sslProvider ) ;
Buggy code:
public class ApplicationStringResourceLoaderTest extends StringResourceLoaderTestBase { public ApplicationStringResourceLoaderTest ( String message ) { } protected IStringResourceLoader createLoader ( ) { } public void testLoaderUnknownResources ( ) { IApplication app = new IApplication ( ) { public String getName ( ) { return "MissingResourceApp" ; } public ApplicationSettings getSettings ( ) { return settings ; } public ApplicationPages getPages ( ) { return pages ; } private ApplicationPages pages = new ApplicationPages ( ) ; private ApplicationSettings settings = new ApplicationSettings ( this ) ; } ; IStringResourceLoader loader = new ApplicationStringResourceLoader ( app ) ; <START_BUG> Assert . assertNull ( "Unknown<seq2seq4repair_space>resource<seq2seq4repair_space>should<seq2seq4repair_space>return<seq2seq4repair_space>null" , loader . get ( component , "test.string" , Locale . getDefault ( ) , null ) ) ; <END_BUG> } public void testNullApplication ( ) { } }

Fix:
Assert . assertNull ( "Unknown<seq2seq4repair_space>resource<seq2seq4repair_space>should<seq2seq4repair_space>return<seq2seq4repair_space>null" , loader . loadStringResource ( component , "test.string" , Locale . getDefault ( ) , null ) ) ;